diff options
author | 2013-06-03 14:02:15 +0000 | |
---|---|---|
committer | 2013-06-03 14:02:15 +0000 | |
commit | e69a54b0bc2a06452031f5a04c7e807d933025e3 (patch) | |
tree | b192586ba86ea51ab0012e1874eee374ea19ecc4 /platform_tools | |
parent | cf89b6fc3011ee9219bd7bf544fd98fb91d8c27a (diff) |
fix broken skia_launcher app
R=borenet@google.com
Review URL: https://codereview.chromium.org/15995008
git-svn-id: http://skia.googlecode.com/svn/trunk@9399 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools')
-rw-r--r-- | platform_tools/android/launcher/skia_launcher.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/platform_tools/android/launcher/skia_launcher.cpp b/platform_tools/android/launcher/skia_launcher.cpp index 231289d4e9..16f4b3d7a8 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; } |