diff options
author | Raphael Moll <ralf@android.com> | 2012-11-19 16:41:08 -0800 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2012-11-19 16:47:15 -0800 |
commit | d5d08c0ab6c4a0228544f6839e33045cf9b43723 (patch) | |
tree | 50fd118bb815d6bba1898b2c06cbee0bad947631 /sdklauncher | |
parent | 4b6971ed181e871d5ec812dbe5c799a7b1c7dc3a (diff) | |
download | sdk-d5d08c0ab6c4a0228544f6839e33045cf9b43723.zip sdk-d5d08c0ab6c4a0228544f6839e33045cf9b43723.tar.gz sdk-d5d08c0ab6c4a0228544f6839e33045cf9b43723.tar.bz2 |
SDK Launcher support sdk\tools\android.bat
The SDK Launcher is the "SDK Manager.exe" redirector
that is copied at the root of an installed SDK. This
change the path where it looks for android.bat so that
it can also work when placed at the root of an ADT
bundle.
SDK Bug: 39686
Change-Id: I6222e45be5a3aca62d3557e2f8763c21c07f4f5d
Diffstat (limited to 'sdklauncher')
-rw-r--r-- | sdklauncher/.gitignore | 3 | ||||
-rw-r--r-- | sdklauncher/sdklauncher.c | 20 | ||||
-rwxr-xr-x | sdklauncher/sdklauncher.vcproj | 193 |
3 files changed, 216 insertions, 0 deletions
diff --git a/sdklauncher/.gitignore b/sdklauncher/.gitignore index 1721bc7..0d02bac 100644 --- a/sdklauncher/.gitignore +++ b/sdklauncher/.gitignore @@ -1 +1,4 @@ images/sdklauncher_icon.o +*.ncb +*.suo +*.user diff --git a/sdklauncher/sdklauncher.c b/sdklauncher/sdklauncher.c index fd03d99..6b2c45c 100644 --- a/sdklauncher/sdklauncher.c +++ b/sdklauncher/sdklauncher.c @@ -99,6 +99,8 @@ int sdk_launcher() { if (!result) { dprintf("Program dir: %s\n", program_dir); + // SDK Manager.exe is installed by the Windows Installer just below + // the tools directory and needs to access tools\android.bat ret = CreateProcess( NULL, /* program path */ "tools\\android.bat sdk", /* command-line */ @@ -111,6 +113,24 @@ int sdk_launcher() { &startup, /* startup info, i.e. std handles */ &pinfo); + if (!ret) { + dprintf("CreateProcess returned %d\n", ret); + + // In the ADT bundle, SDK Manager.exe is located in the sdk folder + // and needs to access sdk\tools\android.bat + ret = CreateProcess( + NULL, /* program path */ + "sdk\\tools\\android.bat sdk", /* command-line */ + NULL, /* process handle is not inheritable */ + NULL, /* thread handle is not inheritable */ + TRUE, /* yes, inherit some handles */ + CREATE_NO_WINDOW, /* we don't want a console */ + NULL, /* use parent's environment block */ + program_dir, /* use parent's starting directory */ + &startup, /* startup info, i.e. std handles */ + &pinfo); + } + dprintf("CreateProcess returned %d\n", ret); if (!ret) { diff --git a/sdklauncher/sdklauncher.vcproj b/sdklauncher/sdklauncher.vcproj new file mode 100755 index 0000000..7d2e816 --- /dev/null +++ b/sdklauncher/sdklauncher.vcproj @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="SdkLauncher"
+ ProjectGUID="{331EADA4-DC19-429D-AAD0-5B9632B4CBC1}"
+ RootNamespace="sdklauncher"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)..\..\out\host\windows-x86\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(SolutionDir)..\..\out\host\windows-x86\$(ConfigurationName)\$(ProjectName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)..\..\out\host\windows-x86\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(SolutionDir)..\..\out\host\windows-x86\$(ConfigurationName)\$(ProjectName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\sdklauncher.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
|