[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 0.1.0.10-153-g2af9814

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:55:53 CEST 2013


The branch, twofactorauth has been updated
       via  2af9814fdec18b6fedf41c043bbd81e6d41efb7b (commit)
      from  4e59e6aa657b0f49f43a923c1336954da7cd55e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 nsis_template.py |   86 ++++++++++++++++++++++++++++--------------------------
 setup.py         |    8 ++---
 2 files changed, 48 insertions(+), 46 deletions(-)

The diff of changes is:
diff --git a/nsis_template.py b/nsis_template.py
index 88bc15e..ac73c36 100644
--- a/nsis_template.py
+++ b/nsis_template.py
@@ -18,14 +18,14 @@ Caption "{program_desc}"
 !define py2exeOutputDirectory '{output_dir}'
 
 ; The file to write
-OutFile "installers\{program_name}_${{VERSION}}_win32-setup.exe"
+OutFile "..\\{program_name}_${{VERSION}}_win32-setup.exe"
 
 ; The default installation directory
-InstallDir $PROGRAMFILES\{program_name}
+InstallDir $PROGRAMFILES\\{program_name}
 
 ; Registry key to check for directory (so if you install again, it will 
 ; overwrite the old one automatically)
-InstallDirRegKey HKLM "Software\{program_name}" "Install_Dir"
+InstallDirRegKey HKLM "Software\\{program_name}" "Install_Dir"
 
 ; Request application privileges for Windows Vista
 RequestExecutionLevel admin
@@ -34,7 +34,7 @@ RequestExecutionLevel admin
 
 ; Installer Language Configuration
 
-!include ${{PROGRAMFILES}}\NSIS\Include\LogicLib.nsh
+!include LogicLib.nsh
 
 var LC_MESSAGES
 
@@ -46,22 +46,22 @@ var WITHOUT_PULSEAUDIO
 var GSPRINT
 
 ; First is default
-LoadLanguageFile "${NSISDIR}}\Contrib\Language files\English.nlf"
-LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\Dutch.nlf"
-;LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\French.nlf"
-LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\German.nlf"
-;LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\Korean.nlf"
-;LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\Russian.nlf"
-LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\Spanish.nlf"
-;LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\Swedish.nlf"
-;LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\TradChinese.nlf"
-;LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\SimpChinese.nlf"
-;LoadLanguageFile "${{NSISDIR}}\Contrib\Language files\Slovak.nlf"
+LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\English.nlf"
+LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\Dutch.nlf"
+;LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\French.nlf"
+LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\German.nlf"
+;LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\Korean.nlf"
+;LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\Russian.nlf"
+LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\Spanish.nlf"
+;LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\Swedish.nlf"
+;LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\TradChinese.nlf"
+;LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\SimpChinese.nlf"
+;LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\Slovak.nlf"
 
 ; License data
 ; Not exactly translated, but it shows what's needed
-LicenseLangString myLicenseData ${{LANG_ENGLISH}}} "LICENSE.txt"
-LicenseLangString myLicenseData ${LANG_DUTCH}}} "LICENSE.txt"
+LicenseLangString myLicenseData ${{LANG_ENGLISH}} "LICENSE.txt"
+LicenseLangString myLicenseData ${{LANG_DUTCH}} "LICENSE.txt"
 ;LicenseLangString myLicenseData ${{LANG_FRENCH}} "LICENSE.txt"
 LicenseLangString myLicenseData ${{LANG_GERMAN}} "LICENSE.txt"
 ;LicenseLangString myLicenseData ${{LANG_KOREAN}} "LICENSE.txt"
@@ -123,24 +123,26 @@ Function .onInit
         ${{Switch}} $LANGUAGE
           ${{Case}} 1031
             StrCpy $LC_MESSAGES "de"
-            !include nsis_include\de.nsi
+            !include "nsis_include\\de.nsi"
             ${{Break}}
           ${{Case}} 1033
             StrCpy $LC_MESSAGES "en"
-            !include nsis_include\en.nsi
+            !include "nsis_include\\en.nsi"
             ${{Break}}
           ${{Case}} 1043
             StrCpy $LC_MESSAGES "nl"
-            !include nsis_include\nl.nsi
+            !include "nsis_include\\nl.nsi"
             ${{Break}}
           ${{Case}} 1034
             StrCpy $LC_MESSAGES "es"
-            !include nsis_include\es.nsi
+            !include "nsis_include\\es.nsi"
             ${{Break}}
         ${{EndSwitch}}
 
         StrCmp $LANGUAGE "cancel" 0 +2
-                Abort
+            Abort
+
+FunctionEnd
 
 ;--------------------------------
 
@@ -161,16 +163,16 @@ Section "{program_name} ($REQUIRED)"
   SectionIn RO
   ; Set output path to the installation directory.
   SetOutPath $INSTDIR
-  File /r /x .svn /x .git ${{py2exeOutputDirectory}}\*.*
+  File /r /x .svn /x .git ${{py2exeOutputDirectory}}\\*.*
 
   ; Write the installation path into the registry
-  WriteRegStr HKLM SOFTWARE\{program_name} "Install_Dir" "$INSTDIR"
+  WriteRegStr HKLM SOFTWARE\\{program_name} "Install_Dir" "$INSTDIR"
 
   ; Write the uninstall keys for Windows
-  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\{program_name}" "DisplayName" "{program_name}"
-  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\{program_name}" "UninstallString" '"$INSTDIR\uninstall.exe"'
-  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\{program_name}" "NoModify" 1
-  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\{program_name}" "NoRepair" 1
+  WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{program_name}" "DisplayName" "{program_name}"
+  WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{program_name}" "UninstallString" '"$INSTDIR\\uninstall.exe"'
+  WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{program_name}" "NoModify" 1
+  WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{program_name}" "NoRepair" 1
   WriteUninstaller "uninstall.exe"
 
 SectionEnd
@@ -178,20 +180,20 @@ SectionEnd
 ; Optional section (can be disabled by the user)
 Section "$STARTMENU_LINKS"
 
-  CreateDirectory "$SMPROGRAMS\{program_name}"
-  CreateShortCut "$SMPROGRAMS\{program_name}\{program_name}.lnk" "$INSTDIR\{program_name}.exe" "--quiet --start-xserver --start-pulseaudio --lang $LC_MESSAGES" "$INSTDIR\icons\{program_name}.ico" 0
-  CreateShortCut "$SMPROGRAMS\{program_name}\{program_name} ($WITHOUT_PULSEAUDIO).lnk" "$INSTDIR\{program_name}.exe" "--quiet --start-xserver --lang $LC_MESSAGES" "$INSTDIR\icons\{program_name}.ico" 0
-  CreateShortCut "$SMPROGRAMS\{program_name}\{program_name} (debug).lnk" "$INSTDIR\{program_name}.exe" "--debug --libdebug --start-xserver --start-pulseaudio --lang $LC_MESSAGES" "$INSTDIR\icons\{program_name}.ico" 0
-  CreateShortCut "$SMPROGRAMS\{program_name}\{program_name} ($WITHOUT_PULSEAUDIO, debug).lnk" "$INSTDIR\{program_name}.exe" "--debug --libdebug --start-xserver --lang $LC_MESSAGES" "$INSTDIR\icons\{program_name}.ico" 0
-  CreateShortCut "$SMPROGRAMS\{program_name}\X2go Website.lnk" "http://www.x2go.org" "" "$INSTDIR\icons\pyhoca_x2go-logo-ubuntu.ico" 0
-  CreateShortCut "$SMPROGRAMS\{program_name}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+  CreateDirectory "$SMPROGRAMS\\{program_name}"
+  CreateShortCut "$SMPROGRAMS\\{program_name}\\{program_name}.lnk" "$INSTDIR\\{program_name}.exe" "--quiet --start-xserver --start-pulseaudio --lang $LC_MESSAGES" "$INSTDIR\\icons\\{program_name}.ico" 0
+  CreateShortCut "$SMPROGRAMS\\{program_name}\\{program_name} ($WITHOUT_PULSEAUDIO).lnk" "$INSTDIR\\{program_name}.exe" "--quiet --start-xserver --lang $LC_MESSAGES" "$INSTDIR\\icons\\{program_name}.ico" 0
+  CreateShortCut "$SMPROGRAMS\\{program_name}\\{program_name} (debug).lnk" "$INSTDIR\\{program_name}.exe" "--debug --libdebug --start-xserver --start-pulseaudio --lang $LC_MESSAGES" "$INSTDIR\\icons\\{program_name}.ico" 0
+  CreateShortCut "$SMPROGRAMS\\{program_name}\\{program_name} ($WITHOUT_PULSEAUDIO, debug).lnk" "$INSTDIR\\{program_name}.exe" "--debug --libdebug --start-xserver --lang $LC_MESSAGES" "$INSTDIR\\icons\\{program_name}.ico" 0
+  CreateShortCut "$SMPROGRAMS\\{program_name}\\X2go Website.lnk" "http://www.x2go.org" "" "$INSTDIR\\icons\\pyhoca_x2go-logo-ubuntu.ico" 0
+  CreateShortCut "$SMPROGRAMS\\{program_name}\\Uninstall.lnk" "$INSTDIR\\uninstall.exe" "" "$INSTDIR\\uninstall.exe" 0
 
 SectionEnd
 
 ; Optional section (can be disabled by the user)
 Section "$DESKTOP_LINKS"
 
-  CreateShortCut "$DESKTOP\{program_name}.lnk" "$INSTDIR\{program_name}.exe" "--quiet --start-xserver --start-pulseaudio --lang $LC_MESSAGES" "$INSTDIR\icons\{program_name}.ico" 0
+  CreateShortCut "$DESKTOP\\{program_name}.lnk" "$INSTDIR\\{program_name}.exe" "--quiet --start-xserver --start-pulseaudio --lang $LC_MESSAGES" "$INSTDIR\\icons\\{program_name}.ico" 0
 
 SectionEnd
 
@@ -202,18 +204,18 @@ SectionEnd
 Section "Uninstall"
 
   ; Remove registry keys
-  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\{program_name}"
-  DeleteRegKey HKLM SOFTWARE\{program_name}
+  DeleteRegKey HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{program_name}"
+  DeleteRegKey HKLM SOFTWARE\\{program_name}
 
   ; Remove files and uninstaller
-  Delete $INSTDIR\uninstall.exe
+  Delete $INSTDIR\\uninstall.exe
 
   ; Remove shortcuts, if any
-  Delete "$SMPROGRAMS\{program_name}\*.*"
-  Delete "$DESKTOP\{program_name}.lnk"
+  Delete "$SMPROGRAMS\\{program_name}\\*.*"
+  Delete "$DESKTOP\\{program_name}.lnk"
 
   ; Remove directories used
-  RMDir "$SMPROGRAMS\{program_name}"
+  RMDir "$SMPROGRAMS\\{program_name}"
   RMDir /r /REBOOTOK $INSTDIR
 
 SectionEnd
diff --git a/setup.py b/setup.py
index ee20f1f..1ca1150 100755
--- a/setup.py
+++ b/setup.py
@@ -46,6 +46,8 @@ LICENSE = 'GPLv3+'
 AUTHOR = 'Mike Gabriel, Dick Kniep'
 URL = 'http://www.x2go.org'
 
+NSIS_COMPILE = os.path.join(os.environ['ProgramFiles'], 'NSIS', 'makensis.exe')
+
 #
 # to build .exe file, run on Windows:
 # ,,python setup.py py2exe''
@@ -68,8 +70,6 @@ def datafilelist(installbase, sourcebase):
 
 class NSISScript(object):
 
-    NSIS_COMPILE = "makensis"
-
     def __init__(self, program_name, program_desc, program_version, dist_dir, icon_loc):
         self.program_name = program_name
         self.program_desc =  program_desc
@@ -93,7 +93,7 @@ class NSISScript(object):
         subproc = subprocess.Popen(
             # "/P5" uses realtime priority for the LZMA compression stage.
             # This can get annoying though.
-            [self.NSIS_COMPILE, self.pathname, "/P5"], env=os.environ)
+            [NSIS_COMPILE, self.pathname, "/P5"], env=os.environ)
         subproc.communicate()
 
         retcode = subproc.returncode
@@ -151,7 +151,7 @@ if platform.system() == 'Windows':
 
     cmd_class.update(
         {
-            "py2exe": build_installer,
+            "build_exe": build_installer,
         }
     )
 


hooks/post-receive
-- 
pyhoca-gui.git (Python X2Go Client (wxPython GUI))

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).




More information about the x2go-commits mailing list