Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2023-03-03 11:30:13 +0300
committerwurstsalat <mailtrash@posteo.de>2023-03-03 11:30:13 +0300
commit799233644e42e7864075a63f640bfc20ce55a49e (patch)
treee0f03fe8d50661d7ae8321c00f06230662430418 /win
parent535f7b44c5f694f34080a72fc065228e75ddb3b6 (diff)
cfix: Windows installer: Save files using UTF-8 with BOM, convert intendation to spaces
Diffstat (limited to 'win')
-rw-r--r--win/misc/gajim-portable.nsi4
-rw-r--r--win/misc/gajim.nsi156
2 files changed, 79 insertions, 81 deletions
diff --git a/win/misc/gajim-portable.nsi b/win/misc/gajim-portable.nsi
index e65d27377..42176e286 100644
--- a/win/misc/gajim-portable.nsi
+++ b/win/misc/gajim-portable.nsi
@@ -1,10 +1,9 @@
-; File encoding 'UTF-8 with BOM'
+; File encoding 'UTF-8 with BOM'
Unicode true
!include "MUI2.nsh"
!include "LogicLib.nsh"
-
Name "Gajim"
OutFile "Gajim-Portable.exe"
SetCompressor /final /solid lzma
@@ -103,7 +102,6 @@ Section "Gajim" SecGajim
"" "" "" SW_SHOWNORMAL "" "Gajim Portable Debug"
FileOpen $0 "is_portable" w
FileClose $0
-
SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
diff --git a/win/misc/gajim.nsi b/win/misc/gajim.nsi
index 3dab28b1a..f2397a64f 100644
--- a/win/misc/gajim.nsi
+++ b/win/misc/gajim.nsi
@@ -1,4 +1,4 @@
-; File encoding 'UTF-8 with BOM'
+; File encoding 'UTF-8 with BOM'
Unicode true
!include "MUI2.nsh"
@@ -120,107 +120,107 @@ LangString DESC_SecURI ${LANG_HEBREW} "Enables Gajim to open xmpp links (e.g. a
Section "Gajim" SecGajim
SectionIn RO
-
+
Var /GLOBAL arch_name
StrCpy $arch_name "(64-Bit)"
StrCmp ${ARCH} "mingw64" continue
StrCpy $arch_name "(32-Bit)"
continue:
- ReadRegStr $R3 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString"
- ${If} ${FileExists} $R3
- ; If Gajim was installed before, run uninstaller (in silent mode)
- ExecWait '"$R3" /S _?=$INSTDIR'
- ${EndIf}
-
- SetOutPath "$INSTDIR"
- File /r "${ARCH}\*.*"
-
- WriteRegStr HKCU "Software\Gajim" "" $INSTDIR
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim ${VERSION} $arch_name"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" "$INSTDIR\Uninstall.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\bin\Gajim.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "${VERSION}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "URLInfoAbout" "https://www.gajim.org/"
- WriteUninstaller "$INSTDIR\Uninstall.exe"
-
- SetOutPath "$INSTDIR\bin"
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetShellVarContext current
- CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
- CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
- SetShellVarContext all
- CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
- CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
- !insertmacro MUI_STARTMENU_WRITE_END
+ ReadRegStr $R3 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString"
+ ${If} ${FileExists} $R3
+ ; If Gajim was installed before, run uninstaller (in silent mode)
+ ExecWait '"$R3" /S _?=$INSTDIR'
+ ${EndIf}
+
+ SetOutPath "$INSTDIR"
+ File /r "${ARCH}\*.*"
+
+ WriteRegStr HKCU "Software\Gajim" "" $INSTDIR
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim ${VERSION} $arch_name"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" "$INSTDIR\Uninstall.exe"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\bin\Gajim.exe"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "${VERSION}"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "URLInfoAbout" "https://www.gajim.org/"
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+ SetOutPath "$INSTDIR\bin"
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetShellVarContext current
+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
+ SetShellVarContext all
+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
+ !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section $(NAME_SecDesktopIcon) SecDesktopIcon
- SetShellVarContext current
- SetOutPath "$INSTDIR\bin"
- CreateShortCut "$DESKTOP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
+ SetShellVarContext current
+ SetOutPath "$INSTDIR\bin"
+ CreateShortCut "$DESKTOP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
SectionEnd
Section $(NAME_SecAutostart) SecAutostart
- SetShellVarContext current
- SetOutPath "$INSTDIR\bin"
- CreateShortCut "$SMSTARTUP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
+ SetShellVarContext current
+ SetOutPath "$INSTDIR\bin"
+ CreateShortCut "$SMSTARTUP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
SectionEnd
Section $(NAME_SecURI) SecURI
- WriteRegStr HKCU "Software\Classes\xmpp" "" "URL:xmpp-uri"
- WriteRegStr HKCU "Software\Classes\xmpp" "URL Protocol" ""
- WriteRegStr HKCU "Software\Classes\xmpp\DefaultIcon" "" "$INSTDIR\bin\Gajim.exe,1"
- WriteRegStr HKCU "Software\Classes\xmpp\shell" "" "open"
- WriteRegStr HKCU "Software\Classes\xmpp\shell\open\" "FriendlyAppName" "${myAppName}"
- WriteRegStr HKCU "Software\Classes\xmpp\shell\open\command" "" '"$INSTDIR\bin\Gajim.exe" "%1"'
+ WriteRegStr HKCU "Software\Classes\xmpp" "" "URL:xmpp-uri"
+ WriteRegStr HKCU "Software\Classes\xmpp" "URL Protocol" ""
+ WriteRegStr HKCU "Software\Classes\xmpp\DefaultIcon" "" "$INSTDIR\bin\Gajim.exe,1"
+ WriteRegStr HKCU "Software\Classes\xmpp\shell" "" "open"
+ WriteRegStr HKCU "Software\Classes\xmpp\shell\open\" "FriendlyAppName" "${myAppName}"
+ WriteRegStr HKCU "Software\Classes\xmpp\shell\open\command" "" '"$INSTDIR\bin\Gajim.exe" "%1"'
SectionEnd
Section "Uninstall"
- ; Hint: Gajim setup should not be named gajim.exe, else it will be killed here
- ExecWait "TaskKill /IM gdbus.exe /F"
- ExecWait "TaskKill /IM gajim.exe /F"
- ExecWait "TaskKill /IM gajim-debug.exe /F"
-
- RMDir /r "$INSTDIR"
-
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
-
- SetShellVarContext current
- Delete "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk"
- RMDir "$SMPROGRAMS\$StartMenuFolder"
- Delete "$DESKTOP\Gajim.lnk"
- Delete "$SMSTARTUP\Gajim.lnk"
- SetShellVarContext all
- Delete "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk"
- RMDir "$SMPROGRAMS\$StartMenuFolder"
-
- DeleteRegKey /ifempty HKCU "Software\Gajim"
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim"
+ ; Hint: Gajim setup should not be named gajim.exe, else it will be killed here
+ ExecWait "TaskKill /IM gdbus.exe /F"
+ ExecWait "TaskKill /IM gajim.exe /F"
+ ExecWait "TaskKill /IM gajim-debug.exe /F"
+
+ RMDir /r "$INSTDIR"
+
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+
+ SetShellVarContext current
+ Delete "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk"
+ RMDir "$SMPROGRAMS\$StartMenuFolder"
+ Delete "$DESKTOP\Gajim.lnk"
+ Delete "$SMSTARTUP\Gajim.lnk"
+ SetShellVarContext all
+ Delete "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk"
+ RMDir "$SMPROGRAMS\$StartMenuFolder"
+
+ DeleteRegKey /ifempty HKCU "Software\Gajim"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim"
SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${SecGajim} $(DESC_SecGajim)
- !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(DESC_SecDesktopIcon)
- !insertmacro MUI_DESCRIPTION_TEXT ${SecAutostart} $(DESC_SecAutostart)
- !insertmacro MUI_DESCRIPTION_TEXT ${SecURI} $(DESC_SecURI)
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecGajim} $(DESC_SecGajim)
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(DESC_SecDesktopIcon)
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecAutostart} $(DESC_SecAutostart)
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecURI} $(DESC_SecURI)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function .onInit
- BringToFront
- ; Check if already running
- ; If so don't open another but bring to front
- System::Call "kernel32::CreateMutexA(i 0, i 0, t '$(^Name)') i .r0 ?e"
- Pop $0
- StrCmp $0 0 StartInstall
- StrLen $0 "$(^Name)"
- IntOp $0 $0 + 1
- FindWindow $1 '#32770' '' 0 $1
- IntCmp $1 0 +3
- System::Call "user32::ShowWindow(i r1,i 9) i." ; If minimized then maximize
- System::Call "user32::SetForegroundWindow(i r1) i." ; Bring to front
- Abort
+ BringToFront
+ ; Check if already running
+ ; If so don't open another but bring to front
+ System::Call "kernel32::CreateMutexA(i 0, i 0, t '$(^Name)') i .r0 ?e"
+ Pop $0
+ StrCmp $0 0 StartInstall
+ StrLen $0 "$(^Name)"
+ IntOp $0 $0 + 1
+ FindWindow $1 '#32770' '' 0 $1
+ IntCmp $1 0 +3
+ System::Call "user32::ShowWindow(i r1,i 9) i." ; If minimized then maximize
+ System::Call "user32::SetForegroundWindow(i r1) i." ; Bring to front
+ Abort
StartInstall:
- !insertmacro MUI_LANGDLL_DISPLAY ; Open the language selection window
+ !insertmacro MUI_LANGDLL_DISPLAY ; Open the language selection window
FunctionEnd