[tuxdroid-svn] r4707 - software_suite_v3/smart-core/smart-api/python/trunk
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-05-29 12:43:08
|
Author: remi
Date: 2009-05-29 14:42:02 +0200 (Fri, 29 May 2009)
New Revision: 4707
Modified:
software_suite_v3/smart-core/smart-api/python/trunk/installer.nsi
Log:
* updated installer nsi script
Modified: software_suite_v3/smart-core/smart-api/python/trunk/installer.nsi
===================================================================
--- software_suite_v3/smart-core/smart-api/python/trunk/installer.nsi 2009-05-29 12:24:56 UTC (rev 4706)
+++ software_suite_v3/smart-core/smart-api/python/trunk/installer.nsi 2009-05-29 12:42:02 UTC (rev 4707)
@@ -3,12 +3,12 @@
; -----------------------------------------------------------------------------
; HM NIS Edit Wizard helper defines
-!define PRODUCT_NAME "Tuxisalive python package"
+!define PRODUCT_NAME "Smart API for python"
!define PRODUCT_VERSION "0.3.0"
; Output names
-!define FINAL_INSTALLER_EXE "pyTuxisaliveInstaller_${PRODUCT_VERSION}.exe"
-!define UNINSTALLER_EXE "pyTuxisaliveUninstaller.exe"
+!define FINAL_INSTALLER_EXE "pySmartAPIInstaller.exe"
+!define UNINSTALLER_EXE "pySmartAPIUninstaller.exe"
; The name of the installer
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
@@ -28,11 +28,28 @@
var /GLOBAL UNINSTALLERS_SUB_PATH
; -----------------------------------------------------------------------------
+; 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-API
+ 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 $TUXDROID_PYTHON_PATH "$TUXDROID_PATH\softwares\python2.4"
StrCpy $UNINSTALLERS_SUB_PATH "$TUXDROID_PATH\uninstallers\sub"
@@ -41,8 +58,8 @@
SetOutPath "$TUXDROID_PYTHON_PATH\Lib\site-packages\tuxisalive"
File /r tuxisalive\*
- CreateDirectory "$TUXDROID_PATH\resources\misc"
- SetOutPath "$TUXDROID_PATH\resources\misc"
+ CreateDirectory "$TUXDROID_PATH\resources\images"
+ SetOutPath "$TUXDROID_PATH\resources\images"
File tuxsh.ico
; Write bat file
@@ -52,7 +69,7 @@
Call WriteToFile
; Write shortcut in start menu
- CreateShortCut "$SMPROGRAMS\Tux Droid\Tuxshell.lnk" "$TUXDROID_PATH\bin\tuxsh.bat" "" "$TUXDROID_PATH\resources\misc\tuxsh.ico" 0
+ CreateShortCut "$SMPROGRAMS\Tux Droid\Tux Droid Shell.lnk" "$TUXDROID_PATH\bin\tuxsh.bat" "" "$TUXDROID_PATH\resources\images\tuxsh.ico" 0
; Write the uninstall file
WriteUninstaller "$UNINSTALLERS_SUB_PATH\${UNINSTALLER_EXE}"
@@ -65,19 +82,26 @@
; Section "Uninstall"
; -----------------------------------------------------------------------------
Section "Uninstall"
+ ; Kill troublesome tasks
+ Processes::KillProcess "pythonForTuxdroid"
+ Processes::KillProcess "pythonForTuxdroidA"
+ Processes::KillProcess "python"
+ Processes::KillProcess "java"
+ Processes::KillProcess "javaw"
+ Processes::KillProcess "tux_wifi_channel"
; 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 $TUXDROID_PYTHON_PATH "$TUXDROID_PATH\softwares\python2.4"
StrCpy $UNINSTALLERS_SUB_PATH "$TUXDROID_PATH\uninstallers\sub"
; Remove files and uninstaller
Delete "$TUXDROID_PATH\bin\tuxsh.bat"
- Delete "$TUXDROID_PATH\resources\misc\tuxsh.ico"
+ Delete "$TUXDROID_PATH\resources\images\tuxsh.ico"
RMDir /r "$TUXDROID_PYTHON_PATH\Lib\site-packages\tuxisalive"
Delete "$UNINSTALLERS_SUB_PATH\${UNINSTALLER_EXE}"
; Remove shortcuts
- Delete "$SMPROGRAMS\Tux Droid\Tuxshell.lnk"
+ Delete "$SMPROGRAMS\Tux Droid\Tux Shell.lnk"
; Quit the uninstaller
Quit
|