diff options
Diffstat (limited to 'sdklauncher')
-rw-r--r-- | sdklauncher/Android.mk | 4 | ||||
-rw-r--r-- | sdklauncher/sdklauncher.c | 15 |
2 files changed, 9 insertions, 10 deletions
diff --git a/sdklauncher/Android.mk b/sdklauncher/Android.mk index 8fda183..1f165f7 100644 --- a/sdklauncher/Android.mk +++ b/sdklauncher/Android.mk @@ -22,10 +22,12 @@ LOCAL_CFLAGS += -Wall -Wno-unused-parameter LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY LOCAL_MODULE := sdklauncher +LOCAL_MODULE_TAGS := optional + # Locate windres executable WINDRES := windres ifneq ($(USE_MINGW),) - # When building the Windows emulator under Linux, use the MinGW one + # When building the Windows resources under Linux, use the MinGW one WINDRES := i586-mingw32msvc-windres endif diff --git a/sdklauncher/sdklauncher.c b/sdklauncher/sdklauncher.c index d3c4445..570da86 100644 --- a/sdklauncher/sdklauncher.c +++ b/sdklauncher/sdklauncher.c @@ -20,10 +20,7 @@ * and currently simply executes tools\android.bat. * Eventually it should simply replace the batch file. * - * TODO: - * - create temp dir, always copy *.jar there, exec android.jar - * - get jars to copy from some file - * - use a version number to copy jars only if needed (tools.revision?) + * TODO: replace by a jar-exe wrapper. */ #ifdef _WIN32 @@ -223,7 +220,7 @@ int sdk_launcher() { ret = CreateProcess( NULL, /* program path */ - "tools\\android.bat update sdk", /* command-line */ + "tools\\android.bat sdk", /* command-line */ NULL, /* process handle is not inheritable */ NULL, /* thread handle is not inheritable */ TRUE, /* yes, inherit some handles */ @@ -232,7 +229,7 @@ int sdk_launcher() { program_dir, /* use parent's starting directory */ &startup, /* startup info, i.e. std handles */ &pinfo); - + dprintf("CreateProcess returned %d\n", ret); if (!ret) { @@ -240,13 +237,13 @@ int sdk_launcher() { result = 1; } else { dprintf("Wait for process to finish.\n"); - + WaitForSingleObject(pinfo.hProcess, INFINITE); CloseHandle(pinfo.hProcess); CloseHandle(pinfo.hThread); } } - + dprintf("Cleanup.\n"); if (!CloseHandle(temp_handle)) { @@ -267,7 +264,7 @@ int sdk_launcher() { int main(int argc, char **argv) { _enable_dprintf = argc > 1 && strcmp(argv[1], "-v") == 0; dprintf("Verbose debug mode.\n"); - + return sdk_launcher(); } |