Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: platform_tools/android/launcher/skia_launcher.cpp

Issue 15995008: fix broken skia_launcher app (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/launcher/skia_launcher.cpp
diff --git a/platform_tools/android/launcher/skia_launcher.cpp b/platform_tools/android/launcher/skia_launcher.cpp
index 231289d4e921d57c2ae18a44df0d491d5f4f39d4..16f4b3d7a8d3fda25b88eba27d48e956ccca1d4c 100644
--- a/platform_tools/android/launcher/skia_launcher.cpp
+++ b/platform_tools/android/launcher/skia_launcher.cpp
@@ -8,8 +8,8 @@
#include <dlfcn.h>
#include <stdio.h>
-void usage(const char* argv0) {
- printf("[USAGE] %s program_name [options]\n", argv0);
+void usage() {
+ printf("[USAGE] skia_launcher program_name [options]\n");
printf(" program_name: the skia program you want to launch (e.g. tests, bench)\n");
printf(" options: options specific to the program you are launching\n");
}
@@ -28,15 +28,15 @@ int launch_app(int (*app_main)(int, const char**), int argc,
return (*app_main)(argc, argv);
}
-void* load_library(const char** argv, const char* libraryName)
+void* load_library(const char* appLocation, const char* libraryName)
{
// attempt to lookup the location of the shared libraries
char libraryLocation[100];
- sprintf(libraryLocation, "%s/lib/lib%s.so", argv[0], libraryName);
+ sprintf(libraryLocation, "%s/lib/lib%s.so", appLocation, libraryName);
if (!file_exists(libraryLocation)) {
printf("ERROR: Unable to find the appropriate library in the Skia App.\n");
printf("ERROR: Did you provide the correct program_name?\n");
- usage(argv[0]);
+ usage();
return NULL;
}
@@ -56,7 +56,7 @@ int main(int argc, const char** argv) {
// check that the program name was specified
if (argc < 2) {
printf("ERROR: No program_name was specified\n");
- usage(argv[0]);
+ usage();
return -1;
}
@@ -68,14 +68,14 @@ int main(int argc, const char** argv) {
}
// load the local skia shared library
- void* skiaLibrary = load_library(argv, "libskia_android.so");
+ void* skiaLibrary = load_library(appLocation, "libskia_android.so");
if (NULL == skiaLibrary)
{
return -1;
}
// load the appropriate library
- void* appLibrary = load_library(argv, argv[1]);
+ void* appLibrary = load_library(appLocation, argv[1]);
if (NULL == appLibrary) {
return -1;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698