Author: remi
Date: 2009-02-12 15:23:07 +0100 (Thu, 12 Feb 2009)
New Revision: 3627
Modified:
software_suite_v2/tuxware/installers/win/trunk/tuxsetup.nsi
Log:
* added a confirmation popup before to removing the "MyTux" user directory
Modified: software_suite_v2/tuxware/installers/win/trunk/tuxsetup.nsi
===================================================================
--- software_suite_v2/tuxware/installers/win/trunk/tuxsetup.nsi 2009-02-12
13:11:42 UTC (rev 3626)
+++ software_suite_v2/tuxware/installers/win/trunk/tuxsetup.nsi 2009-02-12
14:23:07 UTC (rev 3627)
@@ -80,26 +80,29 @@
LicenseLangString license ${LANG_ENGLISH} "COPYING_ENGLISH"
LangString REG_Language ${LANG_ENGLISH} "en_US"
LangString CHECK_dongleDisconnected ${LANG_ENGLISH} "Make sure the USB dongle
is disconnected before continuing the installation."
+LangString DELETE_MyTuxDirectory ${LANG_ENGLISH} "Do you also want to remove
your configuration settings and installed gadgets and attitunes ?"
!insertmacro MUI_LANGUAGE "French"
LicenseLangString license ${LANG_FRENCH} "COPYING_FRENCH"
LangString REG_Language ${LANG_FRENCH} "fr"
LangString CHECK_dongleDisconnected ${LANG_FRENCH} "Assurez-vous que le
poisson USB ne soit pas branch� avant de continuer l'installation."
+LangString DELETE_MyTuxDirectory ${LANG_FRENCH} "Voulez-vous aussi supprimer
votre configuration ainsi que les gadgets et attitunes ?"
!insertmacro MUI_LANGUAGE "Dutch"
LicenseLangString license ${LANG_DUTCH} "COPYING_DUTCH"
LangString REG_Language ${LANG_DUTCH} "nl_BE"
LangString CHECK_dongleDisconnected ${LANG_DUTCH} "Gelieve te controleren of
de USB dongle niet verbonden is vooraleer verder te gaan met de installatie."
+LangString DELETE_MyTuxDirectory ${LANG_DUTCH} "Wilt u ook uw configuratie en
ge�nstalleerde gadgets en attitunes vertwijderen ?"
!insertmacro MUI_LANGUAGE "Spanish"
LicenseLangString license ${LANG_SPANISH} "COPYING_SPANISH"
LangString REG_Language ${LANG_SPANISH} "es"
LangString CHECK_dongleDisconnected ${LANG_SPANISH} "Asegurese que el USB
dongle esta desconectado antes de continuar la instalacion."
+LangString DELETE_MyTuxDirectory ${LANG_SPANISH} "Do you also want to remove
your configuration settings and installed gadgets and attitunes ?"
!insertmacro MUI_PAGE_LICENSE $(license)
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_INSTFILES
-!insertmacro MUI_UNPAGE_CONFIRM
; -----------------------------------------------------------------------------
; Initialization of the installer
@@ -262,6 +265,53 @@
WriteRegExpandStr ${EnvStr_RegKey} "PATH" "$R1"
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment"
/TIMEOUT=5000
+ MessageBox MB_YESNO|MB_ICONQUESTION "$(DELETE_MyTuxDirectory)" IDNO
NoRemoveLabel
+ Call un.getUserPath
+ RMDir /r "$R0\MyTux"
+ NoRemoveLabel:
+
SetDetailsPrint textonly
SectionEnd
!endif
+
+; -----------------------------------------------------------------------------
+; Function to retrieve the user path
+; R0 : The returned path
+; -----------------------------------------------------------------------------
+Function un.RIndexOf
+Exch $R0
+Exch
+Exch $R1
+Push $R2
+Push $R3
+
+ StrCpy $R3 $R0
+ StrCpy $R0 0
+ IntOp $R0 $R0 + 1
+ StrCpy $R2 $R3 1 -$R0
+ StrCmp $R2 "" +2
+ StrCmp $R2 $R1 +2 -3
+
+ StrCpy $R0 -1
+
+Pop $R3
+Pop $R2
+Pop $R1
+Exch $R0
+FunctionEnd
+
+!macro un.RIndexOf Var Str Char
+Push "${Char}"
+Push "${Str}"
+ Call un.RIndexOf
+Pop "${Var}"
+!macroend
+!define un.RIndexOf "!insertmacro un.RIndexOf"
+
+Function un.getUserPath
+ ${un.RIndexOf} $R0 "$DOCUMENTS" "\"
+ StrLen $1 "$DOCUMENTS"
+ IntOp $1 $1 - $R0
+ StrCpy $R0 "$DOCUMENTS" $1
+FunctionEnd
+
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn