[tuxdroid-svn] r4705 - software_suite_v3/smart-core/smart-server/trunk
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-05-29 13:10:02
|
Author: remi
Date: 2009-05-29 14:16:25 +0200 (Fri, 29 May 2009)
New Revision: 4705
Modified:
software_suite_v3/smart-core/smart-server/trunk/installer.nsi
Log:
* updated installer nsi script
Modified: software_suite_v3/smart-core/smart-server/trunk/installer.nsi
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/installer.nsi 2009-05-29 12:14:49 UTC (rev 4704)
+++ software_suite_v3/smart-core/smart-server/trunk/installer.nsi 2009-05-29 12:16:25 UTC (rev 4705)
@@ -7,8 +7,8 @@
!define PRODUCT_VERSION "0.4.0"
; Output names
-!define FINAL_INSTALLER_EXE "tuxHTTPServerInstaller_${PRODUCT_VERSION}.exe"
-!define UNINSTALLER_EXE "tuxHTTPServerUninstaller.exe"
+!define FINAL_INSTALLER_EXE "SmartServerInstaller.exe"
+!define UNINSTALLER_EXE "SmartServerUninstaller.exe"
; The name of the installer
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
@@ -27,17 +27,33 @@
var /GLOBAL UNINSTALLERS_SUB_PATH
; -----------------------------------------------------------------------------
-; Section ""
+; Section Pre-installation
; -----------------------------------------------------------------------------
+Section -Pre
+!ifndef INNER
+ ; Needed
+ SectionIn RO
+ ; Get the Tuxdroid installation path
+ ReadRegStr $TUXDROID_PATH HKLM "SOFTWARE\Tux Droid\Installation" "Install_Dir"
+ ; Uninstall old installations of Smart-Server
+ DetailPrint "Uninstalling old versions"
+ SetDetailsPrint none
+ ExecWait '"$TUXDROID_PATH\uninstallers\sub\${UNINSTALLER_EXE}" /S _?=$TUXDROID_PATH\uninstallers'
+ SetDetailsPrint textonly
+!endif
+SectionEnd
+; -----------------------------------------------------------------------------
+; Section ""
+; -----------------------------------------------------------------------------
Section ""
; Get the Tuxdroid installation paths
- ReadRegStr $TUXDROID_PATH HKLM "SOFTWARE\Tuxdroid\TuxdroidSetup" "Install_Dir"
+ ReadRegStr $TUXDROID_PATH HKLM "SOFTWARE\Tux Droid\Installation" "Install_Dir"
StrCpy $UNINSTALLERS_SUB_PATH "$TUXDROID_PATH\uninstallers\sub"
-
+
; Write the files
- CreateDirectory "$TUXDROID_PATH\softwares\tuxhttpserver"
- SetOutPath "$TUXDROID_PATH\softwares\tuxhttpserver"
+ CreateDirectory "$TUXDROID_PATH\softwares\smart-server"
+ SetOutPath "$TUXDROID_PATH\softwares\smart-server"
File COPYING
File tuxhttpserver.py
File version.py
@@ -51,42 +67,37 @@
File TDSResourcesManager.py
File TDSService.py
File TuxDroidServer.py
-
- CreateDirectory "$TUXDROID_PATH\softwares\tuxhttpserver\data"
- SetOutPath "$TUXDROID_PATH\softwares\tuxhttpserver\data"
+
+ CreateDirectory "$TUXDROID_PATH\softwares\smart-server\data"
+ SetOutPath "$TUXDROID_PATH\softwares\smart-server\data"
File /r data\*
-
- RMDir /r "$TUXDROID_PATH\softwares\tuxhttpserver\resources"
- CreateDirectory "$TUXDROID_PATH\softwares\tuxhttpserver\resources"
- SetOutPath "$TUXDROID_PATH\softwares\tuxhttpserver\resources"
+
+ CreateDirectory "$TUXDROID_PATH\softwares\smart-server\resources"
+ SetOutPath "$TUXDROID_PATH\softwares\smart-server\resources"
File /r resources\*
-
- CreateDirectory "$TUXDROID_PATH\softwares\tuxhttpserver\util"
- SetOutPath "$TUXDROID_PATH\softwares\tuxhttpserver\util"
+
+ CreateDirectory "$TUXDROID_PATH\softwares\smart-server\util"
+ SetOutPath "$TUXDROID_PATH\softwares\smart-server\util"
File /r util\*
-
- CreateDirectory "$TUXDROID_PATH\softwares\tuxhttpserver\content"
- SetOutPath "$TUXDROID_PATH\softwares\tuxhttpserver\content"
- File /r content\*
-
+
SetOutPath "$TUXDROID_PATH\bin"
- File delphi_launchers\tuxhttpserver_start.exe
- File delphi_launchers\tuxhttpserver_stop.exe
- File delphi_launchers\tuxhttpserver_restart.exe
-
- CreateDirectory "$TUXDROID_PATH\resources\misc"
- SetOutPath "$TUXDROID_PATH\resources\misc"
+ File delphi_launchers\smart_server_start.exe
+ File delphi_launchers\smart_server_stop.exe
+ File delphi_launchers\smart_server_restart.exe
+
+ CreateDirectory "$TUXDROID_PATH\resources\images"
+ SetOutPath "$TUXDROID_PATH\resources\images"
File tuxsys.ico
-
+
; Write shortcut in start menu
CreateDirectory "$SMPROGRAMS\Tux Droid"
- CreateDirectory "$SMPROGRAMS\Tux Droid\Tuxware"
- CreateDirectory "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer"
- CreateShortCut "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer\Start.lnk" "$TUXDROID_PATH\bin\tuxhttpserver_start.exe" "" "$TUXDROID_PATH\resources\misc\tuxsys.ico" 0
- CreateShortCut "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer\Stop.lnk" "$TUXDROID_PATH\bin\tuxhttpserver_stop.exe" "" "$TUXDROID_PATH\resources\misc\tuxsys.ico" 0
- CreateShortCut "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer\Restart.lnk" "$TUXDROID_PATH\bin\tuxhttpserver_restart.exe" "" "$TUXDROID_PATH\resources\misc\tuxsys.ico" 0
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "TuxHTTPServer" "$TUXDROID_PATH\bin\tuxhttpserver_start.exe"
-
+ CreateDirectory "$SMPROGRAMS\Tux Droid\Smart-Core"
+ CreateDirectory "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server"
+ CreateShortCut "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server\Start.lnk" "$TUXDROID_PATH\bin\smart_server_start.exe" "" "$TUXDROID_PATH\resources\images\tuxsys.ico" 0
+ CreateShortCut "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server\Stop.lnk" "$TUXDROID_PATH\bin\smart_server_stop.exe" "" "$TUXDROID_PATH\resources\images\tuxsys.ico" 0
+ CreateShortCut "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server\Restart.lnk" "$TUXDROID_PATH\bin\smart_server_restart.exe" "" "$TUXDROID_PATH\resources\images\tuxsys.ico" 0
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "Smart-Server" "$TUXDROID_PATH\bin\smart_server_start.exe"
+
; Write the uninstall file
WriteUninstaller "$UNINSTALLERS_SUB_PATH\${UNINSTALLER_EXE}"
Return
@@ -97,42 +108,26 @@
; -----------------------------------------------------------------------------
Section "Uninstall"
; Get the Tuxdroid installation paths
- ReadRegStr $TUXDROID_PATH HKLM "SOFTWARE\Tuxdroid\TuxdroidSetup" "Install_Dir"
+ ReadRegStr $TUXDROID_PATH HKLM "SOFTWARE\Tux Droid\Installation" "Install_Dir"
StrCpy $UNINSTALLERS_SUB_PATH "$TUXDROID_PATH\uninstallers\sub"
-
+
; Remove registry keys
- DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "TuxHTTPServer"
+ DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "Smart-Server"
; Remove files and uninstaller
- Delete "$TUXDROID_PATH\bin\tuxhttpserver_start.exe"
- Delete "$TUXDROID_PATH\bin\tuxhttpserver_stop.exe"
- Delete "$TUXDROID_PATH\bin\tuxhttpserver_restart.exe"
- Delete "$TUXDROID_PATH\resources\misc\tuxsys.ico"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\COPYING"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\tuxhttpserver.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\version.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSAccessManager.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSClient.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSClientLevels.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSClientsManager.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSConfiguration.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSError.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSHTTPServer.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSResourcesManager.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TDSService.py"
- Delete "$TUXDROID_PATH\softwares\tuxhttpserver\TuxDroidServer.py"
-
- RMDir /r "$TUXDROID_PATH\softwares\tuxhttpserver\data"
- RMDir /r "$TUXDROID_PATH\softwares\tuxhttpserver\util"
- RMDir /r "$TUXDROID_PATH\softwares\tuxhttpserver\resources"
+ Delete "$TUXDROID_PATH\bin\smart_server_start.exe"
+ Delete "$TUXDROID_PATH\bin\smart_server_stop.exe"
+ Delete "$TUXDROID_PATH\bin\smart_server_restart.exe"
+ Delete "$TUXDROID_PATH\resources\images\tuxsys.ico"
+ RMDir /r "$TUXDROID_PATH\softwares\smart-server"
Delete "$UNINSTALLERS_SUB_PATH\${UNINSTALLER_EXE}"
-
+
; Remove shortcuts
- Delete "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer\Stop.lnk"
- Delete "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer\Start.lnk"
- Delete "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer\Restart.lnk"
- RMDir /r "$SMPROGRAMS\Tux Droid\Tuxware\HTTPServer"
-
+ Delete "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server\Stop.lnk"
+ Delete "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server\Start.lnk"
+ Delete "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server\Restart.lnk"
+ RMDir /r "$SMPROGRAMS\Tux Droid\Smart-Core\Smart-Server"
+
; Quit the uninstaller
Quit
SectionEnd
|