aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcanni2007 <canni2007@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-03 16:26:42 +0000
committercanni2007 <canni2007@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-03 16:26:42 +0000
commit684c6fad668e9a5573d8236e62fe015f0a507bd9 (patch)
tree1dcb531b2861145f9a3d919c6f463d6c08af39b3
parent987ead98aca9e8b87343741980a30aeeb7f765f7 (diff)
downloadusdx-684c6fad668e9a5573d8236e62fe015f0a507bd9.tar.gz
usdx-684c6fad668e9a5573d8236e62fe015f0a507bd9.tar.xz
usdx-684c6fad668e9a5573d8236e62fe015f0a507bd9.zip
Updated Installer check routines
jira:USDX-163 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1@570 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Installer/Readme.txt2
-rw-r--r--Installer/UltraStar Deluxe.nsi56
-rw-r--r--Installer/icons/uninstall.ico (renamed from InstallerDependencies/icons/uninstall.ico)bin22486 -> 22486 bytes
-rw-r--r--Installer/icons/ustar.ico (renamed from InstallerDependencies/icons/ustar.ico)bin22486 -> 22486 bytes
-rw-r--r--Installer/settings/functions.nsh2
5 files changed, 44 insertions, 16 deletions
diff --git a/Installer/Readme.txt b/Installer/Readme.txt
index f3e72b98..5538e0a2 100644
--- a/Installer/Readme.txt
+++ b/Installer/Readme.txt
@@ -1,4 +1,4 @@
-SOURCE (3th of November 2007, 14:00 UTC+1 MESZ)
+SOURCE (3th of November 2007, 17:30 UTC+1 MESZ)
Build using Nullsoft Install System
(http://nsis.sourceforge.net/)
diff --git a/Installer/UltraStar Deluxe.nsi b/Installer/UltraStar Deluxe.nsi
index b38f7ca3..296977f4 100644
--- a/Installer/UltraStar Deluxe.nsi
+++ b/Installer/UltraStar Deluxe.nsi
@@ -8,8 +8,8 @@
!include ".\settings\functions.nsh"
!include "WinVer.nsh"
-!define icon_inst "..\InstallerDependencies\icons\ustar.ico" ; Icon for Installation
-!define icon_uninst "..\InstallerDependencies\icons\uninstall.ico" ; Icon for Uninstallation
+!define icon_inst ".\icons\ustar.ico" ; Icon for Installation
+!define icon_uninst ".\icons\uninstall.ico" ; Icon for Uninstallation
SetCompress Auto
SetCompressor /SOLID lzma
@@ -65,6 +65,7 @@ SetDatablockOptimize On
Name "${p_name} V.${version}"
Brandingtext "${p_name} Installation"
OutFile "Install ${p_name} V.${version}.exe"
+!define ins_name "Install ${p_name} V.${version}.exe"
InstallDir "$PROGRAMFILES\${p_name}"
@@ -98,6 +99,10 @@ ShowUnInstDetails show
!define MUI_STARTMENUPAGE_BGCOLOR "${smp_bgcolor}" ; RGB Background of Startmenu List and Textbox
;!define MUI_INSTFILESPAGE_COLORS "${dets_bgcolor}" ; Background Color of Details Screen while files are being extracted
+
+!define MUI_LANGDLL_WINDOWTITLE "USdx In-/Uninstaller: Choose language"
+!define MUI_LANGDLL_ALWAYSSHOW
+
!define MUI_FINISHPAGE_NOAUTOCLOSE ; Allows user to check the log file of installation (Comment out if unwanted)
!define MUI_UNFINISHPAGE_NOAUTOCLOSE ; Allows user to check the log file of uninstallation (Comment out if unwanted)
@@ -109,13 +114,6 @@ ShowUnInstDetails show
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(sc_desktop)
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortCuts
-;Language Dialog Box Settings
-;!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
-;!define PRODUCT_UNINST_ROOT_KEY "HKLM"
-;!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
-;!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
-;!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
-
; --------------------------------------------------
; Begin of the installation routine
; --------------------------------------------------
@@ -494,23 +492,53 @@ SectionEnd
; Function for Installation
Function .onInit
- !insertmacro MUI_LANGDLL_DISPLAY
+
+ System::Call 'kernel32::CreateMutexA(i 0, i 0, t "USdx Installer.exe") ?e'
+
+ Pop $R0
+
+ StrCmp $R0 0 +3
+ MessageBox MB_OK "The installer is already running."
+ Abort
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+ ReadRegStr $R0 HKLM \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
+ "UninstallString"
+ StrCmp $R0 "" done
+
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION \
+ "${PRODUCT_NAME} is already installed. $\n$\nAre you sure you want to \
+ install it again?" \
+ IDYES done
+ Abort
+
+
+done:
+
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS ".\settings\settings-1031.ini" "Settings-1031"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS ".\settings\settings-1033.ini" "Settings-1033"
+
FunctionEnd
; Function for Uninstallation
Function un.onInit
- loop:
${nsProcess::FindProcess} "USdx.exe" $R0
StrCmp $R0 0 0 +2
- MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'UltraStar Deluxe cannot be uninstalled while its running!' IDOK loop IDCANCEL end
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION 'UltraStar Deluxe cannot be uninstalled while its running! Do you want to close it?' IDYES closeit IDNO end
+
+ closeit:
+ ${nsProcess::KillProcess} "USdx.exe" $R0
+ goto continue
- end:
+ end:
${nsProcess::Unload}
+ Abort
+ continue:
+ !insertmacro MUI_LANGDLL_DISPLAY
- !insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd \ No newline at end of file
diff --git a/InstallerDependencies/icons/uninstall.ico b/Installer/icons/uninstall.ico
index 1c72432a..1c72432a 100644
--- a/InstallerDependencies/icons/uninstall.ico
+++ b/Installer/icons/uninstall.ico
Binary files differ
diff --git a/InstallerDependencies/icons/ustar.ico b/Installer/icons/ustar.ico
index f3214d1a..f3214d1a 100644
--- a/InstallerDependencies/icons/ustar.ico
+++ b/Installer/icons/ustar.ico
Binary files differ
diff --git a/Installer/settings/functions.nsh b/Installer/settings/functions.nsh
index a62b9137..147ec76c 100644
--- a/Installer/settings/functions.nsh
+++ b/Installer/settings/functions.nsh
@@ -52,7 +52,7 @@ FunctionEnd
!macroend
!define WriteToConfig "!insertmacro WriteToConfig"
-; Finds and kills UltraStar Deluxe process
+; Finds UltraStar Deluxe process
;
!define nsProcess::FindProcess `!insertmacro nsProcess::FindProcess`