From 59bce060ef680751d6860827240cf19e492018aa Mon Sep 17 00:00:00 2001 From: "yongsung1.kim" Date: Tue, 4 Mar 2014 19:02:15 +0900 Subject: [PATCH] [STUB] Modify nsis script. Installmanager cannot work well sometimes because 'comspec' environment variable is not set. So, Add if condition in nsis script. Change-Id: I1b070395562a6183ba0ba86fa11b8d05fb58eb76 Signed-off-by: yongsung1.kim --- os_stubs/windows/InstallManager-64.nsi | 20 ++++++++++++++------ os_stubs/windows/InstallManager.nsi | 11 ++++++++--- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/os_stubs/windows/InstallManager-64.nsi b/os_stubs/windows/InstallManager-64.nsi index c41c187..2399ea4 100644 --- a/os_stubs/windows/InstallManager-64.nsi +++ b/os_stubs/windows/InstallManager-64.nsi @@ -1,6 +1,6 @@ outfile "inst-manager.exe" -Name "Tizen-SDK" +Name "Samsung-gear-SDK" ShowInstDetails show @@ -168,11 +168,19 @@ done: ## Check java version and java execution. ExpandEnvStrings $3 %COMSPEC% - ${DisableX64FSRedirection} ; execute cmd command for windows7 64bit - nsExec::ExecToStack '"$3" /C ""java.exe" "-version""' - Pop $0 - Pop $6 - ${EnableX64FSRedirection} ; execute cmd command for windows7 64bit + ${If} $3 == "%COMSPEC%" + ${DisableX64FSRedirection} ; execute cmd command for windows7 64bit + nsExec::ExecToStack '"java.exe" "-version"' + ${EnableX64FSRedirection} ; execute cmd command for windows7 64bit + Pop $0 + Pop $6 + ${Else} + ${DisableX64FSRedirection} ; execute cmd command for windows7 64bit + nsExec::ExecToStack '"$3" /C ""java.exe" "-version""' + ${EnableX64FSRedirection} ; execute cmd command for windows7 64bit + Pop $0 + Pop $6 + ${EndIf} ## check java 1.6 Push $6 diff --git a/os_stubs/windows/InstallManager.nsi b/os_stubs/windows/InstallManager.nsi index e416de1..beed2a3 100644 --- a/os_stubs/windows/InstallManager.nsi +++ b/os_stubs/windows/InstallManager.nsi @@ -1,6 +1,6 @@ outfile "inst-manager.exe" -Name "Tizen-SDK" +Name "Samsung-gear-SDK" ShowInstDetails show @@ -166,8 +166,13 @@ done: ## Check java version and java execution. ExpandEnvStrings $3 %COMSPEC% - - nsExec::ExecToStack '"$3" /C ""java.exe" "-version""' + + ${If} $3 == "%COMSPEC%" + nsExec::ExecToStack '"java.exe" "-version"' + ${Else} + nsExec::ExecToStack '"$3" /C ""java.exe" "-version""' + ${EndIf} + Pop $0 Pop $6 ## check java 1.6 -- 2.7.4