aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2012-11-19 16:41:08 -0800
committerRaphael Moll <ralf@android.com>2012-11-19 16:47:15 -0800
commitd5d08c0ab6c4a0228544f6839e33045cf9b43723 (patch)
tree50fd118bb815d6bba1898b2c06cbee0bad947631
parent4b6971ed181e871d5ec812dbe5c799a7b1c7dc3a (diff)
downloadsdk-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
-rwxr-xr-xfind_java/find_java.sln10
-rw-r--r--sdklauncher/.gitignore3
-rw-r--r--sdklauncher/sdklauncher.c20
-rwxr-xr-xsdklauncher/sdklauncher.vcproj193
4 files changed, 222 insertions, 4 deletions
diff --git a/find_java/find_java.sln b/find_java/find_java.sln
index 17c3228..ec14173 100755
--- a/find_java/find_java.sln
+++ b/find_java/find_java.sln
@@ -7,16 +7,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindJavaExe", "find_java_ex
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindLock", "..\find_lock\find_lock_exe.vcproj", "{42701EC1-6226-47FD-8817-57A3DEC7A1E2}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SdkLauncher", "..\sdklauncher\sdklauncher.vcproj", "{331EADA4-DC19-429D-AAD0-5B9632B4CBC1}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Debug|Win32.ActiveCfg = Debug|Win32
- {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Debug|Win32.Build.0 = Debug|Win32
- {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Release|Win32.ActiveCfg = Release|Win32
- {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Release|Win32.Build.0 = Release|Win32
{D194C98B-3FA4-4DAB-908A-16C03C15EC35}.Debug|Win32.ActiveCfg = Debug|Win32
{D194C98B-3FA4-4DAB-908A-16C03C15EC35}.Debug|Win32.Build.0 = Debug|Win32
{D194C98B-3FA4-4DAB-908A-16C03C15EC35}.Release|Win32.ActiveCfg = Release|Win32
@@ -29,6 +27,10 @@ Global
{42701EC1-6226-47FD-8817-57A3DEC7A1E2}.Debug|Win32.Build.0 = Debug|Win32
{42701EC1-6226-47FD-8817-57A3DEC7A1E2}.Release|Win32.ActiveCfg = Release|Win32
{42701EC1-6226-47FD-8817-57A3DEC7A1E2}.Release|Win32.Build.0 = Release|Win32
+ {331EADA4-DC19-429D-AAD0-5B9632B4CBC1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {331EADA4-DC19-429D-AAD0-5B9632B4CBC1}.Debug|Win32.Build.0 = Debug|Win32
+ {331EADA4-DC19-429D-AAD0-5B9632B4CBC1}.Release|Win32.ActiveCfg = Release|Win32
+ {331EADA4-DC19-429D-AAD0-5B9632B4CBC1}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
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>