This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch cvix/2.x in repository pyhoca-gui. commit 0345c68aed2a95f7524715fd19751d4836d9bdaa Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Feb 6 00:57:29 2014 +0100 CVix: merge in nsis_template options that make sense for CVix, esp. multi-user support --- CVix_nsis_template.py | 186 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 133 insertions(+), 53 deletions(-) diff --git a/CVix_nsis_template.py b/CVix_nsis_template.py index 22fc383..97451aa 100644 --- a/CVix_nsis_template.py +++ b/CVix_nsis_template.py @@ -1,6 +1,23 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# Copyright (C) 2010-2013 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +# +# PyHoca is free software; you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# PyHoca is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + NSIS_SCRIPT_TEMPLATE = """ ;{program_name}.nsi ; @@ -27,47 +44,89 @@ InstallDir $PROGRAMFILES\\{program_name} ; overwrite the old one automatically) InstallDirRegKey HKLM "Software\\{program_name}" "Install_Dir" -; Request application privileges for Windows Vista -RequestExecutionLevel admin - -;-------------------------------- - -; Installer Language Configuration - -!include LogicLib.nsh - -var LC_MESSAGES - -; i18n strings -var REQUIRED -var DESKTOP_LINKS -var STARTMENU_LINKS -var WITHOUT_PULSEAUDIO -var GSPRINT - -; First is default -LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\Dutch.nlf" -LoadLanguageFile "${{NSISDIR}}\\Contrib\\Language files\\English.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" +; OBSOLETE WITH MUI2: Request application privileges for Windows Vista +;RequestExecutionLevel admin + +!define MULTIUSER_EXECUTIONLEVEL Highest +!define MULTIUSER_MUI +!define MULTIUSER_INSTALLMODE_COMMANDLINE +!include MultiUser.nsh +!include MUI2.nsh + +!insertmacro MULTIUSER_PAGE_INSTALLMODE +!insertmacro MUI_PAGE_LICENSE LICENSE.txt +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_INSTFILES + +!insertmacro MUI_LANGUAGE "English" ;first language is the default language +;!insertmacro MUI_LANGUAGE "French" +!insertmacro MUI_LANGUAGE "German" +!insertmacro MUI_LANGUAGE "Spanish" +;!insertmacro MUI_LANGUAGE "SpanishInternational" +;!insertmacro MUI_LANGUAGE "SimpChinese" +;!insertmacro MUI_LANGUAGE "TradChinese" +;!insertmacro MUI_LANGUAGE "Japanese" +;!insertmacro MUI_LANGUAGE "Korean" +;!insertmacro MUI_LANGUAGE "Italian" +!insertmacro MUI_LANGUAGE "Dutch" +;!insertmacro MUI_LANGUAGE "Danish" +!insertmacro MUI_LANGUAGE "Swedish" +;!insertmacro MUI_LANGUAGE "Norwegian" +;!insertmacro MUI_LANGUAGE "NorwegianNynorsk" +;!insertmacro MUI_LANGUAGE "Finnish" +;!insertmacro MUI_LANGUAGE "Greek" +!insertmacro MUI_LANGUAGE "Russian" +;!insertmacro MUI_LANGUAGE "Portuguese" +;!insertmacro MUI_LANGUAGE "PortugueseBR" +;!insertmacro MUI_LANGUAGE "Polish" +;!insertmacro MUI_LANGUAGE "Ukrainian" +;!insertmacro MUI_LANGUAGE "Czech" +;!insertmacro MUI_LANGUAGE "Slovak" +;!insertmacro MUI_LANGUAGE "Croatian" +;!insertmacro MUI_LANGUAGE "Bulgarian" +;!insertmacro MUI_LANGUAGE "Hungarian" +;!insertmacro MUI_LANGUAGE "Thai" +;!insertmacro MUI_LANGUAGE "Romanian" +;!insertmacro MUI_LANGUAGE "Latvian" +;!insertmacro MUI_LANGUAGE "Macedonian" +;!insertmacro MUI_LANGUAGE "Estonian" +;!insertmacro MUI_LANGUAGE "Turkish" +;!insertmacro MUI_LANGUAGE "Lithuanian" +;!insertmacro MUI_LANGUAGE "Slovenian" +;!insertmacro MUI_LANGUAGE "Serbian" +;!insertmacro MUI_LANGUAGE "SerbianLatin" +;!insertmacro MUI_LANGUAGE "Arabic" +;!insertmacro MUI_LANGUAGE "Farsi" +;!insertmacro MUI_LANGUAGE "Hebrew" +;!insertmacro MUI_LANGUAGE "Indonesian" +;!insertmacro MUI_LANGUAGE "Mongolian" +;!insertmacro MUI_LANGUAGE "Luxembourgish" +;!insertmacro MUI_LANGUAGE "Albanian" +;!insertmacro MUI_LANGUAGE "Breton" +;!insertmacro MUI_LANGUAGE "Belarusian" +;!insertmacro MUI_LANGUAGE "Icelandic" +;!insertmacro MUI_LANGUAGE "Malay" +;!insertmacro MUI_LANGUAGE "Bosnian" +;!insertmacro MUI_LANGUAGE "Kurdish" +;!insertmacro MUI_LANGUAGE "Irish" +;!insertmacro MUI_LANGUAGE "Uzbek" +;!insertmacro MUI_LANGUAGE "Galician" +;!insertmacro MUI_LANGUAGE "Afrikaans" +;!insertmacro MUI_LANGUAGE "Catalan" +;!insertmacro MUI_LANGUAGE "Esperanto" +;!insertmacro MUI_LANGUAGE "Asturian" ; License data ; Not exactly translated, but it shows what's needed -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" -;LicenseLangString myLicenseData ${{LANG_RUSSIAN}} "LICENSE.txt" +LicenseLangString myLicenseData ${{LANG_RUSSIAN}} "LICENSE.txt" LicenseLangString myLicenseData ${{LANG_SPANISH}} "LICENSE.txt" -;LicenseLangString myLicenseData ${{LANG_SWEDISH}} "LICENSE.txt" +LicenseLangString myLicenseData ${{LANG_SWEDISH}} "LICENSE.txt" ;LicenseLangString myLicenseData ${{LANG_TRADCHINESE}} "LICENSE.txt" ;LicenseLangString myLicenseData ${{LANG_SIMPCHINESE}} "LICENSE.txt" ;LicenseLangString myLicenseData ${{LANG_SLOVAK}} "LICENSE.txt" @@ -75,39 +134,54 @@ LicenseLangString myLicenseData ${{LANG_SPANISH}} "LICENSE.txt" LicenseData $(myLicenseData) ; Set name using the normal interface (Name command) -LangString Name ${{LANG_DUTCH}} "Dutch" LangString Name ${{LANG_ENGLISH}} "English" +LangString Name ${{LANG_DUTCH}} "Dutch" ;LangString Name ${{LANG_FRENCH}} "French" LangString Name ${{LANG_GERMAN}} "German" ;LangString Name ${{LANG_KOREAN}} "Korean" -;LangString Name ${{LANG_RUSSIAN}} "Russian" +LangString Name ${{LANG_RUSSIAN}} "Russian" LangString Name ${{LANG_SPANISH}} "Spanish" -;LangString Name ${{LANG_SWEDISH}} "Swedish" +LangString Name ${{LANG_SWEDISH}} "Swedish" ;LangString Name ${{LANG_TRADCHINESE}} "Traditional Chinese" ;LangString Name ${{LANG_SIMPCHINESE}} "Simplified Chinese" ;LangString Name ${{LANG_SLOVAK}} "Slovak" -Function .onInit +;-------------------------------- + +; Installer Language Configuration - ;Language selection dialog +;!include LogicLib.nsh +var LC_MESSAGES + +; i18n strings +var REQUIRED +var DESKTOP_LINKS +var STARTMENU_LINKS +var WITHOUT_PULSEAUDIO +var GSPRINT + +Function .onInit + +; ;Language selection dialog +; Push "" - Push ${{LANG_DUTCH}} - Push Dutch Push ${{LANG_ENGLISH}} Push English + Push ${{LANG_DUTCH}} + Push Dutch ; Push ${{LANG_FRENCH}} ; Push French Push ${{LANG_GERMAN}} Push German ; Push ${{LANG_KOREAN}} ; Push Korean -; Push ${{LANG_RUSSIAN}} -; Push Russian + Push ${{LANG_RUSSIAN}} + Push Russian Push ${{LANG_SPANISH}} Push Spanish -; Push ${{LANG_SWEDISH}} -; Push Swedish + Push ${{LANG_SWEDISH}} + Push Swedish ; Push ${{LANG_TRADCHINESE}} ; Push "Traditional Chinese" ; Push ${{LANG_SIMPCHINESE}} @@ -137,23 +211,30 @@ Function .onInit StrCpy $LC_MESSAGES "es" !include "nsis_include\\es.nsi" ${{Break}} + ${{Case}} 1053 + StrCpy $LC_MESSAGES "sv" + !include "nsis_include\\sv.nsi" + ${{Break}} + ${{Case}} 1049 + StrCpy $LC_MESSAGES "ru" + !include "nsis_include\\ru.nsi" + ${{Break}} ${{EndSwitch}} StrCmp $LANGUAGE "cancel" 0 +2 Abort + !insertmacro MULTIUSER_INIT + FunctionEnd -;-------------------------------- +Function un.onInit -; Pages -Page license -Page components -Page directory -Page instfiles + !insertmacro MULTIUSER_UNINIT -UninstPage uninstConfirm -UninstPage instfiles +FunctionEnd + +;-------------------------------- ;-------------------------------- @@ -171,7 +252,6 @@ Section "{program_name} ($REQUIRED)" ; Write the installation path into the registry WriteRegStr HKLM SOFTWARE\\{program_name} "Install_Dir" "$INSTDIR" - WriteRegStr HKLM SOFTWARE\\{program_name} "Path" "$INSTDIR" ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{program_name}" "DisplayName" "{program_name}" -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git