Index: tmp/trunk/org.txm.setups/shared/win/OpenAppDataDirectory.bat
===================================================================
--- tmp/trunk/org.txm.setups/shared/win/OpenAppDataDirectory.bat	(revision 747)
+++ tmp/trunk/org.txm.setups/shared/win/OpenAppDataDirectory.bat	(revision 748)
@@ -1 +0,0 @@
-@start explorer "%appdata%"
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/win/StartDialog.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/trunk/org.txm.setups/shared/win/TXM.bat
===================================================================
--- tmp/trunk/org.txm.setups/shared/win/TXM.bat	(revision 747)
+++ tmp/trunk/org.txm.setups/shared/win/TXM.bat	(revision 748)
@@ -1,82 +0,0 @@
-set installdir=%~dp0
-set DEBUG=0
-set VERSION=0.8.0
-set USERHOME=%USERPROFILE%\
-
-IF NOT EXIST ROAMINGINSTALL GOTO ROAMINGINSTALLDONE
-echo "The 'roaming' install option is set."
-set USERHOME=%HOMEDRIVE%%HOMEPATH%\
-echo "USERHOME set to %USERHOME%"
-
-:ROAMINGINSTALLDONE
-
-IF NOT EXIST ASKUSERDIRECTORY GOTO ASKUSERDIRECTORYDONE
-echo "The 'ask user directory' install option is set."
-for /f "tokens=*" %%a in ('TXM\jre\bin\java -jar StartDialog.jar') do set USERHOME=%%a\
-echo "USERHOME set to %USERHOME%"
-
-:ASKUSERDIRECTORYDONE
-
-IF EXIST "%USERHOME%" GOTO USERHOMEOK
-echo "%USERHOME% does not exist. Aborting"
-msg * "TXM could not start using the USERHOME='%USERHOME%' directory."
-GOTO:EOF
-
-:USERHOMEOK
-
-set TXMHOME=%USERHOME%TXM_%VERSION%\
-set DOTTXM=%TXMHOME%.txm\
-
-mkdir "%TXMHOME%" 
-
-mkdir "%DOTTXM%" 
-
-(
-echo "TXM: getting install date from %installdir%STAMP and %DOTTXM%STAMP files" 
-Fc "%installdir%STAMP" "%DOTTXM%STAMP" 
-) >"%TXMHOME%TXMOutputLogs.txt" 2>"%TXMHOME%TXMErrorLogs.txt" 
-
-IF errorlevel 1 (goto :install) else (goto :run)
-
-:install
-
-(
-echo "New TXM install: it's the first launch after the installation." 
-del "%temp%\org.txm.rcpapplication.prefs" 
-copy "%DOTTXM%configuration\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" 
-copy "%DOTTXM%.metadata\.plugins\org.eclipse.core.runtime\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" 
-copy "%DOTTXM%data\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" 
-
-rmdir "%DOTTXM%" /s /q
-IF errorlevel 1 (echo "TXM: failed to delete %DOTTXM% directory.")
-
-mkdir "%DOTTXM%" 
-IF errorlevel 1 (echo "TXM: failed to create %DOTTXM% directory.")
-
-copy "%installdir%TXM.ini" "%DOTTXM%TXM.ini" 
-IF errorlevel 1 (echo "TXM: failed to copy %DOTTXM%TXM.ini file")
-
-copy "%temp%\org.txm.rcpapplication.prefs" "%DOTTXM%org.txm.rcpapplication.prefs" 
-
-mkdir "%DOTTXM%user" 
-IF errorlevel 1 (echo "TXM: failed to create %DOTTXM%user directory.")
-
-mkdir "%DOTTXM%data" 
-IF errorlevel 1 (echo "TXM: failed to create %DOTTXM%data directory.")
-
-copy "%installdir%STAMP" "%DOTTXM%STAMP" 
-IF errorlevel 1 (echo "TXM: failed to copy %DOTTXM%STAMP file")
-
-) >"%TXMHOME%TXMOutputLogs.txt" 2>"%TXMHOME%TXMErrorLogs.txt" 
-
-:run
-
-(
-
-set _JAVA_OPTIONS=-Duser.home="%USERHOME%"
-
-echo running "%installdir%TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" -data "%DOTTXM%data" -user "%DOTTXM%user" -install "%installdir%" 
-
-"%installdir%\TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" -data "%DOTTXM%data" -user "%DOTTXM%user" -install "%installdir%" 
-
-) >"%TXMHOME%TXMOutputLogs.txt" 2>"%TXMHOME%TXMErrorLogs.txt" 
Index: tmp/trunk/org.txm.setups/shared/win/txm.nsi
===================================================================
--- tmp/trunk/org.txm.setups/shared/win/txm.nsi	(revision 747)
+++ tmp/trunk/org.txm.setups/shared/win/txm.nsi	(revision 748)
@@ -1,73 +1,64 @@
-!include MUI2.nsh
+!include MUI2.nsh
 
-!include nsDialogs.nsh
+!include nsDialogs.nsh
 
-!include LogicLib.nsh
+!include LogicLib.nsh
 
-
+;general
 
-;general
+Name "TXM 0.8.0"
 
-Name "TXM 0.8.0"
+OutFile "TXM_0.8.0_Win64_installer.exe"
 
-OutFile "TXM_0.8.0_Win64_installer.exe"
+InstallDir "$PROGRAMFILES64\TXM"
 
-InstallDir "$PROGRAMFILES64\TXM"
+RequestExecutionLevel admin
 
-RequestExecutionLevel admin
+;compression
 
-
+SetCompressor /FINAL /SOLID lzma
 
-;compression
+SetCompressorDictSize 64
 
-SetCompressor /FINAL /SOLID lzma
 
-SetCompressorDictSize 64
+;interface configuration
 
-
+!define MUI_HEADERIMAGE
 
-;interface configuration
+!define MUI_HEADERIMAGE_RIGHT
 
-!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "header.bmp"
 
-!define MUI_HEADERIMAGE_RIGHT
+!define MUI_HEADERIMAGE_UNBITMAP "header.bmp"
 
-!define MUI_HEADERIMAGE_BITMAP "header.bmp"
+!define MUI_ICON "install.ico"
 
-!define MUI_HEADERIMAGE_UNBITMAP "header.bmp"
+!define MUI_UNICON "uninstall.ico"
 
-!define MUI_ICON "install.ico"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" ; optional
 
-!define MUI_UNICON "uninstall.ico"
 
-!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" ; optional
+;Welcome conf
 
-
+;!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" ; optional
 
-;Welcome conf
+!define MUI_WELCOMEPAGE_TITLE $(WelcomeTitleMessage)
 
-;!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" ; optional
+!define MUI_WELCOMEPAGE_TEXT $(WelcomeTextMessage)
 
-!define MUI_WELCOMEPAGE_TITLE $(WelcomeTitleMessage)
 
-!define MUI_WELCOMEPAGE_TEXT $(WelcomeTextMessage)
+;Finish conf
 
-
+!define MUI_FINISHPAGE_TITLE $(FinishTitleMessage)
 
-;Finish conf
+!define MUI_FINISHPAGE_TEXT $(FinishTextMessage)
 
-!define MUI_FINISHPAGE_TITLE $(FinishTitleMessage)
 
-!define MUI_FINISHPAGE_TEXT $(FinishTextMessage)
+;pages
 
-
 
-;pages
+!insertmacro MUI_PAGE_WELCOME
 
-
-
-!insertmacro MUI_PAGE_WELCOME
-
 ;!insertmacro MUI_PAGE_LICENSE "license_agreement.txt"  
 !insertmacro MUI_PAGE_DIRECTORY
 
@@ -131,12 +122,11 @@
 
 
 ;Languages
-
+
 !insertmacro MUI_LANGUAGE "English"
-!insertmacro MUI_LANGUAGE "French"
+!insertmacro MUI_LANGUAGE "French"
 !insertmacro MUI_LANGUAGE "Russian"
-
-
+
 ;Lang Strings ENGLISH
 LangString AdvancedOptionsTitle ${LANG_ENGLISH} "Advanced options"
 LangString AdvancedOptionsSubTitle ${LANG_ENGLISH} "Check these options only for specific Windows configurations"
@@ -164,29 +154,29 @@
 
 
 ;Lang Strings FRENCH
-LangString AdvancedOptionsTitle ${LANG_FRENCH} "Options avancï¿½es"
-LangString AdvancedOptionsSubTitle ${LANG_FRENCH} "Ne cocher ces options que pour des configurations Windows particuliï¿½res"
-LangString LocalInstallMessage ${LANG_FRENCH} "Ne pas utiliser le rï¿½pertoire utilisateur local (cocher cette option si vous souhaitez utiliser un rï¿½pertoire de connexion de compte itinï¿½rant)."
+LangString AdvancedOptionsTitle ${LANG_FRENCH} "Options avancées"
+LangString AdvancedOptionsSubTitle ${LANG_FRENCH} "Ne cocher ces options que pour des configurations Windows particulières"
+LangString LocalInstallMessage ${LANG_FRENCH} "Ne pas utiliser le répertoire utilisateur local (cocher cette option si vous souhaitez utiliser un répertoire de connexion de compte itinérant)."
 
-LangString AskUserDirMessage ${LANG_FRENCH} "Ne pas utiliser le rï¿½pertoire utilisateur comme rï¿½pertoire de travail de TXM (cocher cette option pour stocker les corpus sur une clï¿½ USB ou sur un disque distant. Dans ce cas, le chemin du rï¿½pertoire de travail sera demandï¿½ ï¿½ chaque lancement de TXM)."
+LangString AskUserDirMessage ${LANG_FRENCH} "Ne pas utiliser le répertoire utilisateur comme répertoire de travail de TXM (cocher cette option pour stocker les corpus sur une clé USB ou sur un disque distant. Dans ce cas, le chemin du répertoire de travail sera demandé chaque lancement de TXM)."
 
 LangString InfosTitleMessage ${LANG_FRENCH} "Pour votre information"
 
-LangString InfosTextMessage ${LANG_FRENCH} "Si TXM est dï¿½jï¿½ installï¿½ sur cette machine, cet installeur le supprimera pour commencer (les corpus existants ne seront pas supprimï¿½s). Pour annuler l'installation, vous pouvez fermer cette fenï¿½tre.$\n$\nConfiguration minimum: Windows Vista 64bit"
+LangString InfosTextMessage ${LANG_FRENCH} "Si TXM est déjà installé sur cette machine, cet installeur le supprimera pour commencer (les corpus existants ne seront pas supprimés). Pour annuler l'installation, vous pouvez fermer cette fenêtre.$\n$\nConfiguration minimum: Windows Vista 64bit"
 
 LangString WelcomeTitleMessage ${LANG_FRENCH} "Bienvenue dans l'installeur de TXM"
 
-LangString WelcomeTextMessage ${LANG_FRENCH} "TXM vous est fourni gracieusement. En contre-partie, dans l'esprit du logiciel libre, vous ï¿½tes invitï¿½ ï¿½ participer ï¿½ son amï¿½lioration. Pour cela, vous n'ï¿½tes pas obligï¿½ d'ï¿½tre dï¿½veloppeur informatique, vous pouvez :$\n * transmettre vos publications ou supports de cours ;$\n * proposer des corrections ou amï¿½liorations ;$\n *  traduire l'interface ou la documentation ;$\n * monter un projet pour adapter TXM ï¿½ vos besoins ;$\n * etc.$\n$\n Voir la rubrique 'Contribuer' du wiki des utilisateurs de TXM : https://groupes.renater.fr/wiki/txm-users/public/contribuer $\n$\n N'hï¿½sitez pas ï¿½ nous contacter pour de plus amples informations : 'textometrie AT groupes.renater DOT fr'."
+LangString WelcomeTextMessage ${LANG_FRENCH} "TXM vous est fourni gracieusement. En contre-partie, dans l'esprit du logiciel libre, vous êtes invité à participer à son amélioration. Pour cela, vous n'êtes pas obligé d'être développeur informatique, vous pouvez :$\n * transmettre vos publications ou supports de cours ;$\n * proposer des corrections ou améliorations ;$\n *  traduire l'interface ou la documentation ;$\n * monter un projet pour adapter TXM à vos besoins ;$\n * etc.$\n$\n Voir la rubrique 'Contribuer' du wiki des utilisateurs de TXM : https://groupes.renater.fr/wiki/txm-users/public/contribuer $\n$\n N'hésitez pas à nous contacter pour de plus amples informations : 'textometrie AT groupes.renater DOT fr'."
 
-LangString FinishTitleMessage ${LANG_FRENCH} "Installation terminï¿½e."
+LangString FinishTitleMessage ${LANG_FRENCH} "Installation terminée."
 
-LangString FinishTextMessage ${LANG_FRENCH} "L'installation s'est correctement terminï¿½e. Une entrï¿½e 'TXM' a ï¿½tï¿½ ajoutï¿½e au menu Dï¿½marrer.$\n$\nSi vous souhaitez ï¿½tiqueter et lemmatiser automatiquement vos corpus avec le logiciel TreeTagger lors de l'import, vous devez suivre les instructions d'installation supplï¿½mentaires fournies dans le menu 'Aide > Installer TreeTagger'."
+LangString FinishTextMessage ${LANG_FRENCH} "L'installation s'est correctement terminée. Une entrée 'TXM' a été ajoutée au menu Démarrer.$\n$\nSi vous souhaitez étiqueter et lemmatiser automatiquement vos corpus avec le logiciel TreeTagger lors de l'import, vous devez suivre les instructions d'installation supplémentaires fournies dans le menu 'Aide > Installer TreeTagger'."
 
-LangString ErrorArch32Message ${LANG_FRENCH} "La version de TXM que vous allez installer est pour un systï¿½me 32 bits, or votre systï¿½me semble ï¿½tre 64 bits. Il faudrait tï¿½lï¿½charger et installer la version 64 bits de TXM. Voulez-vous malgrï¿½ tout continuer cette installation ?"
+LangString ErrorArch32Message ${LANG_FRENCH} "La version de TXM que vous allez installer est pour un système 32 bits, or votre système semble être 64 bits. Il faudrait télécharger et installer la version 64 bits de TXM. Voulez-vous malgré tout continuer cette installation ?"
 
-LangString ErrorArch64Message ${LANG_FRENCH} "La version de TXM que vous allez installer est pour un systï¿½me 64 bits, or votre systï¿½me semble ï¿½tre 32 bits. Il faudrait tï¿½lï¿½charger et installer la version 32 bits de TXM. Voulez-vous malgrï¿½ tout continuer cette installation ?"
+LangString ErrorArch64Message ${LANG_FRENCH} "La version de TXM que vous allez installer est pour un système 64 bits, or votre système semble être 32 bits. Il faudrait télécharger et installer la version 32 bits de TXM. Voulez-vous malgré tout continuer cette installation ?"
 
-LangString UninstallWindowsMessage ${LANG_FRENCH} "TXM est dï¿½jï¿½ installï¿½ sur cette machine. Veuillez cliquer sur 'OK' pour dï¿½sinstaller cette version au prï¿½alable (les corpus seront conservï¿½s). Ou cliquez sur 'Annuler' pour interrompre l'installation. Merci de vous assurer que TXM n'est pas en cours d'exï¿½cution pendant l'installation."
+LangString UninstallWindowsMessage ${LANG_FRENCH} "TXM est déjà installé sur cette machine. Veuillez cliquer sur 'OK' pour désinstaller cette version au préalable (les corpus seront conservés). Ou cliquez sur 'Annuler' pour interrompre l'installation. Merci de vous assurer que TXM n'est pas en cours d'exécution pendant l'installation."
 
 
 
@@ -238,336 +228,294 @@
 
 	done:
 
-FunctionEnd
+FunctionEnd
 
-
-
-Section "Copy files" SecFiles
-
-	#we install txm in INSTDIR
-
-	SetOutPath $INSTDIR
-
-	file /r plugins
-	file /r features
-	file /r configuration
-	file /r jre
-	file /r p2
-
-	file /r cwb
-
-	file /r doc
-
-	file /r schema
-
-	file /r scripts
-
-	file /r samples
-
-	file /r xsl
-
-	file /r css
-
-	file TXM.ico
-
-	file TXM.bat
-
-	file TXM.vbs
+Section "Copy files" SecFiles
 	
-	file StartDialog.jar
+	#we install txm in INSTDIR
+	
+	SetOutPath $INSTDIR
+	
+	File /r ..\..\exportRCP\txm\*.*
+	
+	;File /r plugins
+	;File /r features
+	;File /r configuration
+	;File /r jre
+	;File /r p2
+	;File /r doc
+	;File /r schema
+	;File /r scripts
+	;File /r samples
+	;File /r xsl
+	;File /r css
+	;File TXM.ico
+	;File TXM.bat
+	;File TXM.vbs
+	;File StartDialog.jar
+	;File OpenStartUpLogsDirectory.bat
+	;File IEShims.dll
+	;File libcharset-1.dll
+	;File libglib-2.0-0.dll
+	;File libgnurx-0.dll
+	;File libiconv-2.dll
+	;File libintl-8.dll
+	;File libpcre-1.dll
+	;File pcre3.dll
+	
+	# hide TXM.exe
+	SetFileAttributes "$INSTDIR/TXM.exe" HIDDEN
+	
+	# the users right on install dir to enable updates
+	
+	AccessControl::GrantOnFile "$INSTDIR\TXM" "(S-1-5-32-545)" "FullAccess"
+	
+	#we create the uninstaller
+	
+	WriteUninstaller "$INSTDIR\uninstall.exe"
+	
+	#we set the shortcuts
+	
+	SetShellVarContext all
+	
+	CreateDirectory "$SMPROGRAMS\TXM"
+	
+	CreateShortCut "$SMPROGRAMS\TXM\TXM.lnk" "$INSTDIR\TXM.bat" "$INSTDIR\TXM.ico"
+	
+	CreateShortCut "$SMPROGRAMS\TXM\uninstall.lnk" "$INSTDIR\uninstall.exe"
+	
+	#CreateShortCut "$SMPROGRAMS\TXM\Manuel utilisateur FR.pdf.lnk" "$INSTDIR\doc\Manuel de TXM 0.7 FR.pdf"
+	
+	#CreateShortCut "$SMPROGRAMS\TXM\User Manual EN.pdf.lnk" "$INSTDIR\doc\TXM 0.7 Manual EN.pdf"
+	
 
-	file OpenStartUpLogsDirectory.bat
-
-	file IEShims.dll
-
-	file libcharset-1.dll
-
-	file libglib-2.0-0.dll
-
-	file libgnurx-0.dll
-
-	file libiconv-2.dll
-
-	file libintl-8.dll
-
-	file libpcre-1.dll
-
-	file pcre3.dll
-
-
-	# hide TXM.exe
-
-	SetFileAttributes "$INSTDIR/TXM.exe" HIDDEN
-
-	
-
-	# the users right on install dir to enable updates
-
-	AccessControl::GrantOnFile "$INSTDIR\TXM" "(S-1-5-32-545)" "FullAccess"
-
-	#we create the uninstaller
-
-	WriteUninstaller "$INSTDIR\uninstall.exe"
-
-
-	#we set the shortcuts
-
-	SetShellVarContext all
-
-	CreateDirectory "$SMPROGRAMS\TXM"
-
-	CreateShortCut "$SMPROGRAMS\TXM\TXM.lnk" "$INSTDIR\TXM.bat" "$INSTDIR\TXM.ico"
-
-	CreateShortCut "$SMPROGRAMS\TXM\uninstall.lnk" "$INSTDIR\uninstall.exe"
-
-	#CreateShortCut "$SMPROGRAMS\TXM\Manuel utilisateur FR.pdf.lnk" "$INSTDIR\doc\Manuel de TXM 0.7 FR.pdf"
-
-	#CreateShortCut "$SMPROGRAMS\TXM\User Manual EN.pdf.lnk" "$INSTDIR\doc\TXM 0.7 Manual EN.pdf"
-
-
-
-	; Store installation folder
-
-	WriteRegStr HKCU "Software\TXM" "" $INSTDIR
-
-	
-
-	#register the TXM uninstall to windows programs
-
-	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TXM" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
-
+	; Store installation folder
+	
+	WriteRegStr HKCU "Software\TXM" "" $INSTDIR
+	
+	#register the TXM uninstall to windows programs
+	
+	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TXM" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
+	
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TXM" "DisplayName" "TXM - The Textometrie project builds the new generation of modular and open-source textometry platform and application. The scientific project web site is http://textometrie.ens-lsh.fr/?lang=en. "
 
-	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TXM" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
+	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TXM" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
+	
+SectionEnd
 
-SectionEnd
+Function WriteToFile
 
-
+	Exch $0 ;file to write to
+	
+	Exch
+	
+	Exch $1 ;text to write
+	
+	FileOpen $0 $0 a #open file
+	
+	FileSeek $0 0 END #go to end
+	
+	FileWrite $0 $1 #write to file
+	
+	FileClose $0
+	
+	Pop $1
+	
+	Pop $0
+	
+FunctionEnd
 
-Function WriteToFile
 
-	Exch $0 ;file to write to
+### TimeStamp
 
-	Exch
+!ifndef TimeStamp
 
-	Exch $1 ;text to write
+    !define TimeStamp "!insertmacro _TimeStamp"
+    
+    !macro _TimeStamp FormatedString
+    
+        !ifdef __UNINSTALL__
+	
+            Call un.__TimeStamp
+	    
+        !else
+	
+            Call __TimeStamp
+	    
+        !endif
+	
+        Pop ${FormatedString}
+	
+    !macroend
+    
+ 
+!macro __TimeStamp UN
 
-	FileOpen $0 $0 a #open file
 
-	FileSeek $0 0 END #go to end
+Function ${UN}__TimeStamp
 
-	FileWrite $0 $1 #write to file
+    ClearErrors
+    
+    ## Store the needed Registers on the stack
+    
+        Push $0 ; Stack $0
+	
+        Push $1 ; Stack $1 $0
+	
+        Push $2 ; Stack $2 $1 $0
+	
+        Push $3 ; Stack $3 $2 $1 $0
+	
+        Push $4 ; Stack $4 $3 $2 $1 $0
+	
+        Push $5 ; Stack $5 $4 $3 $2 $1 $0
+	
+        Push $6 ; Stack $6 $5 $4 $3 $2 $1 $0
+	
+        Push $7 ; Stack $7 $6 $5 $4 $3 $2 $1 $0
+	
+        ;Push $8 ; Stack $8 $7 $6 $5 $4 $3 $2 $1 $0
+	
+ 
+    ## Call System API to get the current system Time
+    
+        System::Alloc 16
+	
+        Pop $0
+	
+        System::Call 'kernel32::GetLocalTime(i) i(r0)'
+	
+        System::Call '*$0(&i2, &i2, &i2, &i2, &i2, &i2, &i2, &i2)i (.r1, .r2, n, .r3, .r4, .r5, .r6, .r7)'
+	
+        System::Free $0
+	
+ 
+        IntFmt $2 "%02i" $2
+	
+        IntFmt $3 "%02i" $3
+	
+        IntFmt $4 "%02i" $4
+	
+        IntFmt $5 "%02i" $5
+	
+        IntFmt $6 "%02i" $6
+	
+ 
+    ## Generate Timestamp
+    
+        ;StrCpy $0 "YEAR=$1$\nMONTH=$2$\nDAY=$3$\nHOUR=$4$\nMINUITES=$5$\nSECONDS=$6$\nMS$7"
+	
+        StrCpy $0 "$1$2$3$4$5$6.$7"
+	
+ 
+    ## Restore the Registers and add Timestamp to the Stack
+    
+        ;Pop $8  ; Stack $7 $6 $5 $4 $3 $2 $1 $0
+	
+        Pop $7  ; Stack $6 $5 $4 $3 $2 $1 $0
+	
+        Pop $6  ; Stack $5 $4 $3 $2 $1 $0
+	
+        Pop $5  ; Stack $4 $3 $2 $1 $0
+	
+        Pop $4  ; Stack $3 $2 $1 $0
+	
+        Pop $3  ; Stack $2 $1 $0
+	
+        Pop $2  ; Stack $1 $0
+	
+        Pop $1  ; Stack $0
+	
+        Exch $0 ; Stack ${TimeStamp}
+	
+ 
+FunctionEnd
 
-	FileClose $0
+!macroend
 
-	Pop $1
+!insertmacro __TimeStamp ""
 
-	Pop $0
+!insertmacro __TimeStamp "un."
 
-FunctionEnd
+!endif
 
-
+###########
 
-### TimeStamp
 
-!ifndef TimeStamp
+Section "WriteInstallStamp" secStamp
 
-    !define TimeStamp "!insertmacro _TimeStamp"
+	${TimeStamp} $0
+	
+	Push "$0"
+	
+	Push "$INSTDIR\STAMP" ;file to write to 
+	
+	Call WriteToFile
+	
+SectionEnd
 
-    !macro _TimeStamp FormatedString
 
-        !ifdef __UNINSTALL__
+Section "WriteInstallPrefs" secPrefs
 
-            Call un.__TimeStamp
+	#we set the default preferences
+	
+	!define pathToCqp "$INSTDIR\cwb\bin\win32\cqpserver.exe"
+	
+	!define pathToCqpLib "$INSTDIR\cwb\bin\"
+	
+	!define pathToInit "$INSTDIR\cwb\cqpserver.init"
+	
+	!define pathToR "$INSTDIR\R\bin\x64\Rterm.exe"
+	
+	!define pathToTT "$PROGRAMFILES\treetagger"
+	
+	!define pathToTTMod "$PROGRAMFILES\treetagger\models"
+	
 
-        !else
+	FileOpen $4 "$INSTDIR\install.prefs" a
+	
+	FileSeek $4 0 END
+	
+	FileWrite $4 "$\r$\ncqi_server_path_to_cqplib=${pathToCqpLib}"
+	
+	FileWrite $4 "$\r$\ncqi_server_path_to_executable=${pathToCqp}"
+	
+	FileWrite $4 "$\r$\ncqi_server_path_to_init_file=${pathToInit}"
+	
+	FileWrite $4 "$\r$\nr_path_to_executable=${pathToR}"
+	
+	FileWrite $4 "$\r$\ntreetagger_install_path=${pathToTT}"
+	
+	FileWrite $4 "$\r$\ntreetagger_models_path=${pathToTTMod}"
+	
+	FileClose $4 ; and close the file
+	
+SectionEnd
 
-            Call __TimeStamp
 
-        !endif
-
-        Pop ${FormatedString}
-
-    !macroend
-
- 
-
-!macro __TimeStamp UN
-
-
-
-Function ${UN}__TimeStamp
-
-    ClearErrors
-
-    ## Store the needed Registers on the stack
-
-        Push $0 ; Stack $0
-
-        Push $1 ; Stack $1 $0
-
-        Push $2 ; Stack $2 $1 $0
-
-        Push $3 ; Stack $3 $2 $1 $0
-
-        Push $4 ; Stack $4 $3 $2 $1 $0
-
-        Push $5 ; Stack $5 $4 $3 $2 $1 $0
-
-        Push $6 ; Stack $6 $5 $4 $3 $2 $1 $0
-
-        Push $7 ; Stack $7 $6 $5 $4 $3 $2 $1 $0
-
-        ;Push $8 ; Stack $8 $7 $6 $5 $4 $3 $2 $1 $0
-
- 
-
-    ## Call System API to get the current system Time
-
-        System::Alloc 16
-
-        Pop $0
-
-        System::Call 'kernel32::GetLocalTime(i) i(r0)'
-
-        System::Call '*$0(&i2, &i2, &i2, &i2, &i2, &i2, &i2, &i2)i (.r1, .r2, n, .r3, .r4, .r5, .r6, .r7)'
-
-        System::Free $0
-
- 
-
-        IntFmt $2 "%02i" $2
-
-        IntFmt $3 "%02i" $3
-
-        IntFmt $4 "%02i" $4
-
-        IntFmt $5 "%02i" $5
-
-        IntFmt $6 "%02i" $6
-
- 
-
-    ## Generate Timestamp
-
-        ;StrCpy $0 "YEAR=$1$\nMONTH=$2$\nDAY=$3$\nHOUR=$4$\nMINUITES=$5$\nSECONDS=$6$\nMS$7"
-
-        StrCpy $0 "$1$2$3$4$5$6.$7"
-
- 
-
-    ## Restore the Registers and add Timestamp to the Stack
-
-        ;Pop $8  ; Stack $7 $6 $5 $4 $3 $2 $1 $0
-
-        Pop $7  ; Stack $6 $5 $4 $3 $2 $1 $0
-
-        Pop $6  ; Stack $5 $4 $3 $2 $1 $0
-
-        Pop $5  ; Stack $4 $3 $2 $1 $0
-
-        Pop $4  ; Stack $3 $2 $1 $0
-
-        Pop $3  ; Stack $2 $1 $0
-
-        Pop $2  ; Stack $1 $0
-
-        Pop $1  ; Stack $0
-
-        Exch $0 ; Stack ${TimeStamp}
-
- 
-
-FunctionEnd
-
-!macroend
-
-!insertmacro __TimeStamp ""
-
-!insertmacro __TimeStamp "un."
-
-!endif
-
-###########
-
-
-
-Section "WriteInstallStamp" secStamp
-
-	${TimeStamp} $0
-
-	Push "$0"
-
-	Push "$INSTDIR\STAMP" ;file to write to 
-
-	Call WriteToFile
-
-SectionEnd
-
-
-
-Section "WriteInstallPrefs" secPrefs
-
-	#we set the default preferences
-
-	!define pathToCqp "$INSTDIR\cwb\bin\win32\cqpserver.exe"
-
-	!define pathToCqpLib "$INSTDIR\cwb\bin\"
-
-	!define pathToInit "$INSTDIR\cwb\cqpserver.init"
-
-	!define pathToR "$INSTDIR\R\bin\x64\Rterm.exe"
-
-	!define pathToTT "$PROGRAMFILES\treetagger"
-
-	!define pathToTTMod "$PROGRAMFILES\treetagger\models"
-
-
-
-	FileOpen $4 "$INSTDIR\install.prefs" a
-
-	FileSeek $4 0 END
-
-	FileWrite $4 "$\r$\ncqi_server_path_to_cqplib=${pathToCqpLib}"
-
-	FileWrite $4 "$\r$\ncqi_server_path_to_executable=${pathToCqp}"
-
-	FileWrite $4 "$\r$\ncqi_server_path_to_init_file=${pathToInit}"
-
-	FileWrite $4 "$\r$\nr_path_to_executable=${pathToR}"
-
-	FileWrite $4 "$\r$\ntreetagger_install_path=${pathToTT}"
-
-	FileWrite $4 "$\r$\ntreetagger_models_path=${pathToTTMod}"
-
-	FileClose $4 ; and close the file
-
-SectionEnd
-
-
-
 ;UninstallText "This will uninstall TXM"
 
 
 
 ;uninstaller section start
 
-Section "Uninstall"
+Section "Uninstall"
 
-	# Delete installation key
+	# Delete installation key
+	
+	DeleteRegKey /ifempty HKCU "Software\TXM"
+	
+	# Delete uninstaller key
+	
+	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TXM"
+	
+	# we remove the software
+	
+	RMDir /r $INSTDIR
+	
+	# second, remove the link from the start menu
+	
+	RMDir /r "$SMPROGRAMS\TXM\"
+	
+SectionEnd
 
-	DeleteRegKey /ifempty HKCU "Software\TXM"
-
-	# Delete uninstaller key
-
-	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TXM"
-
-	# we remove the software
-
-	RMDir /r $INSTDIR
-
-	# second, remove the link from the start menu
-
-	RMDir /r "$SMPROGRAMS\TXM\"
-
-SectionEnd
\ No newline at end of file
