diff options
author | Raphael <raphael@google.com> | 2011-09-16 09:18:08 -0700 |
---|---|---|
committer | Raphael <raphael@google.com> | 2011-09-16 09:23:18 -0700 |
commit | fb098496a1460ed7b4bab997bc2acd96934236e7 (patch) | |
tree | b18963366b765122ace8210fdd4dbe469a88f013 /sdklauncher | |
parent | 965869f3da4456d5a143e8bb98246734102f1f12 (diff) | |
download | sdk-fb098496a1460ed7b4bab997bc2acd96934236e7.zip sdk-fb098496a1460ed7b4bab997bc2acd96934236e7.tar.gz sdk-fb098496a1460ed7b4bab997bc2acd96934236e7.tar.bz2 |
AVD Launcher.exe for the Windows SDK.
In Tools R14, the Windows SDK will have 2 icons in the root
of the SDK: one to launch the AVD window, and a different one
to launche the SDK Manager window.
I'll need to change the icon in a later CL. I don't have
any ICO editor at hand right now.
Change-Id: Ic651e3c3d71c2eac5fe851fba8ea2782eca5e594
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(); } |