mirror of https://github.com/Syncplay/syncplay
Move to Unicode version of NSIS
This commit is contained in:
parent
ff0ec52bc1
commit
abd6547c9c
|
@ -16,7 +16,7 @@ import syncplay
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
p = "C:\\Program Files (x86)\\NSIS\\makensis.exe" #TODO: how to move that into proper place, huh
|
p = "C:\\Program Files (x86)\\NSIS\\Unicode\\makensis.exe" #TODO: how to move that into proper place, huh
|
||||||
NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe"
|
NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe"
|
||||||
OUT_DIR = "syncplay v{}".format(syncplay.version)
|
OUT_DIR = "syncplay v{}".format(syncplay.version)
|
||||||
SETUP_SCRIPT_PATH = "syncplay_setup.nsi"
|
SETUP_SCRIPT_PATH = "syncplay_setup.nsi"
|
||||||
|
@ -28,7 +28,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\English.nlf"
|
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\English.nlf"
|
||||||
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Polish.nlf"
|
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Polish.nlf"
|
||||||
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Russian.nlf"
|
LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Russian.nlf"
|
||||||
|
|
||||||
Name "Syncplay $version"
|
Name "Syncplay $version"
|
||||||
OutFile "Syncplay $version Setup.exe"
|
OutFile "Syncplay $version Setup.exe"
|
||||||
InstallDir $$PROGRAMFILES\Syncplay
|
InstallDir $$PROGRAMFILES\Syncplay
|
||||||
|
@ -36,23 +36,23 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
XPStyle on
|
XPStyle on
|
||||||
Icon resources\icon.ico ;Change DIR
|
Icon resources\icon.ico ;Change DIR
|
||||||
SetCompressor /SOLID lzma
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
VIProductVersion "$version.0"
|
VIProductVersion "$version.0"
|
||||||
VIAddVersionKey /LANG=$${LANG_ENGLISH} "ProductName" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_ENGLISH} "ProductName" "Syncplay"
|
||||||
VIAddVersionKey /LANG=$${LANG_ENGLISH} "FileVersion" "$version.0"
|
VIAddVersionKey /LANG=$${LANG_ENGLISH} "FileVersion" "$version.0"
|
||||||
VIAddVersionKey /LANG=$${LANG_ENGLISH} "LegalCopyright" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_ENGLISH} "LegalCopyright" "Syncplay"
|
||||||
VIAddVersionKey /LANG=$${LANG_ENGLISH} "FileDescription" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_ENGLISH} "FileDescription" "Syncplay"
|
||||||
|
|
||||||
VIAddVersionKey /LANG=$${LANG_POLISH} "ProductName" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_POLISH} "ProductName" "Syncplay"
|
||||||
VIAddVersionKey /LANG=$${LANG_POLISH} "FileVersion" "$version.0"
|
VIAddVersionKey /LANG=$${LANG_POLISH} "FileVersion" "$version.0"
|
||||||
VIAddVersionKey /LANG=$${LANG_POLISH} "LegalCopyright" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_POLISH} "LegalCopyright" "Syncplay"
|
||||||
VIAddVersionKey /LANG=$${LANG_POLISH} "FileDescription" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_POLISH} "FileDescription" "Syncplay"
|
||||||
|
|
||||||
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "ProductName" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "ProductName" "Syncplay"
|
||||||
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "FileVersion" "$version.0"
|
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "FileVersion" "$version.0"
|
||||||
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "LegalCopyright" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "LegalCopyright" "Syncplay"
|
||||||
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "FileDescription" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_RUSSIAN} "FileDescription" "Syncplay"
|
||||||
|
|
||||||
LangString ^SyncplayLanguage $${LANG_ENGLISH} "en"
|
LangString ^SyncplayLanguage $${LANG_ENGLISH} "en"
|
||||||
LangString ^Associate $${LANG_ENGLISH} "Associate Syncplay with multimedia files."
|
LangString ^Associate $${LANG_ENGLISH} "Associate Syncplay with multimedia files."
|
||||||
LangString ^VLC $${LANG_ENGLISH} "Install Syncplay interface for VLC 2 and above"
|
LangString ^VLC $${LANG_ENGLISH} "Install Syncplay interface for VLC 2 and above"
|
||||||
|
@ -62,7 +62,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
LangString ^Desktop $${LANG_ENGLISH} "Desktop"
|
LangString ^Desktop $${LANG_ENGLISH} "Desktop"
|
||||||
LangString ^QuickLaunchBar $${LANG_ENGLISH} "Quick Launch Bar"
|
LangString ^QuickLaunchBar $${LANG_ENGLISH} "Quick Launch Bar"
|
||||||
LangString ^UninstConfig $${LANG_ENGLISH} "Delete configuration file."
|
LangString ^UninstConfig $${LANG_ENGLISH} "Delete configuration file."
|
||||||
|
|
||||||
LangString ^SyncplayLanguage $${LANG_POLISH} "pl"
|
LangString ^SyncplayLanguage $${LANG_POLISH} "pl"
|
||||||
LangString ^Associate $${LANG_POLISH} "Skojarz Syncplaya z multimediami"
|
LangString ^Associate $${LANG_POLISH} "Skojarz Syncplaya z multimediami"
|
||||||
LangString ^VLC $${LANG_POLISH} "Zainstaluj interface Syncplaya dla VLC 2+"
|
LangString ^VLC $${LANG_POLISH} "Zainstaluj interface Syncplaya dla VLC 2+"
|
||||||
|
@ -72,7 +72,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
LangString ^Desktop $${LANG_POLISH} "Pulpit"
|
LangString ^Desktop $${LANG_POLISH} "Pulpit"
|
||||||
LangString ^QuickLaunchBar $${LANG_POLISH} "Pasek szybkiego uruchamiania"
|
LangString ^QuickLaunchBar $${LANG_POLISH} "Pasek szybkiego uruchamiania"
|
||||||
LangString ^UninstConfig $${LANG_POLISH} "Usun plik konfiguracyjny."
|
LangString ^UninstConfig $${LANG_POLISH} "Usun plik konfiguracyjny."
|
||||||
|
|
||||||
LangString ^SyncplayLanguage $${LANG_RUSSIAN} "ru"
|
LangString ^SyncplayLanguage $${LANG_RUSSIAN} "ru"
|
||||||
LangString ^Associate $${LANG_RUSSIAN} "Ассоциировать Syncplay с видеофайлами"
|
LangString ^Associate $${LANG_RUSSIAN} "Ассоциировать Syncplay с видеофайлами"
|
||||||
LangString ^VLC $${LANG_RUSSIAN} "Установить интерфейс Syncplay для VLC 2+"
|
LangString ^VLC $${LANG_RUSSIAN} "Установить интерфейс Syncplay для VLC 2+"
|
||||||
|
@ -82,16 +82,16 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
LangString ^Desktop $${LANG_RUSSIAN} "на рабочем столе"
|
LangString ^Desktop $${LANG_RUSSIAN} "на рабочем столе"
|
||||||
LangString ^QuickLaunchBar $${LANG_RUSSIAN} "в меню быстрого запуска"
|
LangString ^QuickLaunchBar $${LANG_RUSSIAN} "в меню быстрого запуска"
|
||||||
LangString ^UninstConfig $${LANG_RUSSIAN} "Удалить файл настроек."
|
LangString ^UninstConfig $${LANG_RUSSIAN} "Удалить файл настроек."
|
||||||
|
|
||||||
PageEx license
|
PageEx license
|
||||||
LicenseData resources\license.txt
|
LicenseData resources\license.txt
|
||||||
PageExEnd
|
PageExEnd
|
||||||
Page custom DirectoryCustom DirectoryCustomLeave
|
Page custom DirectoryCustom DirectoryCustomLeave
|
||||||
Page instFiles
|
Page instFiles
|
||||||
|
|
||||||
UninstPage custom un.installConfirm un.installConfirmLeave
|
UninstPage custom un.installConfirm un.installConfirmLeave
|
||||||
UninstPage instFiles
|
UninstPage instFiles
|
||||||
|
|
||||||
Var Dialog
|
Var Dialog
|
||||||
Var Icon_Syncplay
|
Var Icon_Syncplay
|
||||||
Var Icon_Syncplay_Handle
|
Var Icon_Syncplay_Handle
|
||||||
|
@ -114,7 +114,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
Var Label_Size
|
Var Label_Size
|
||||||
Var Label_Space
|
Var Label_Space
|
||||||
Var Text_Directory
|
Var Text_Directory
|
||||||
|
|
||||||
Var Uninst_Dialog
|
Var Uninst_Dialog
|
||||||
Var Uninst_Icon
|
Var Uninst_Icon
|
||||||
Var Uninst_Icon_Handle
|
Var Uninst_Icon_Handle
|
||||||
|
@ -123,14 +123,14 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
Var Uninst_Text_Directory
|
Var Uninst_Text_Directory
|
||||||
Var Uninst_CheckBox_Config
|
Var Uninst_CheckBox_Config
|
||||||
Var Uninst_CheckBox_Config_State
|
Var Uninst_CheckBox_Config_State
|
||||||
|
|
||||||
Var Size
|
Var Size
|
||||||
Var SizeHex
|
Var SizeHex
|
||||||
Var AvailibleSpace
|
Var AvailibleSpace
|
||||||
Var AvailibleSpaceGiB
|
Var AvailibleSpaceGiB
|
||||||
Var Drive
|
Var Drive
|
||||||
Var VLC_Directory
|
Var VLC_Directory
|
||||||
|
|
||||||
!macro APP_ASSOCIATE EXT FileCLASS DESCRIPTION COMMANDTEXT COMMAND
|
!macro APP_ASSOCIATE EXT FileCLASS DESCRIPTION COMMANDTEXT COMMAND
|
||||||
WriteRegStr HKCR ".$${EXT}" "" "$${FileCLASS}"
|
WriteRegStr HKCR ".$${EXT}" "" "$${FileCLASS}"
|
||||||
WriteRegStr HKCR "$${FileCLASS}" "" `$${DESCRIPTION}`
|
WriteRegStr HKCR "$${FileCLASS}" "" `$${DESCRIPTION}`
|
||||||
|
@ -138,23 +138,23 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
WriteRegStr HKCR "$${FileCLASS}\shell\open" "" `$${COMMANDTEXT}`
|
WriteRegStr HKCR "$${FileCLASS}\shell\open" "" `$${COMMANDTEXT}`
|
||||||
WriteRegStr HKCR "$${FileCLASS}\shell\open\command" "" `$${COMMAND}`
|
WriteRegStr HKCR "$${FileCLASS}\shell\open\command" "" `$${COMMAND}`
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro APP_UNASSOCIATE EXT FileCLASS
|
!macro APP_UNASSOCIATE EXT FileCLASS
|
||||||
; Backup the previously associated File class
|
; Backup the previously associated File class
|
||||||
ReadRegStr $$R0 HKCR ".$${EXT}" `$${FileCLASS}_backup`
|
ReadRegStr $$R0 HKCR ".$${EXT}" `$${FileCLASS}_backup`
|
||||||
WriteRegStr HKCR ".$${EXT}" "" "$$R0"
|
WriteRegStr HKCR ".$${EXT}" "" "$$R0"
|
||||||
DeleteRegKey HKCR `$${FileCLASS}`
|
DeleteRegKey HKCR `$${FileCLASS}`
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro ASSOCIATE EXT
|
!macro ASSOCIATE EXT
|
||||||
!insertmacro APP_ASSOCIATE "$${EXT}" "Syncplay.$${EXT}" "$$INSTDIR\Syncplay.exe,%1%" \
|
!insertmacro APP_ASSOCIATE "$${EXT}" "Syncplay.$${EXT}" "$$INSTDIR\Syncplay.exe,%1%" \
|
||||||
"Open with Syncplay" "$$INSTDIR\Syncplay.exe $$\"%1$$\""
|
"Open with Syncplay" "$$INSTDIR\Syncplay.exe $$\"%1$$\""
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro UNASSOCIATE EXT
|
!macro UNASSOCIATE EXT
|
||||||
!insertmacro APP_UNASSOCIATE "$${EXT}" "Syncplay.$${EXT}"
|
!insertmacro APP_UNASSOCIATE "$${EXT}" "Syncplay.$${EXT}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;Prevents from running more than one instance of installer and sets default state of checkboxes
|
;Prevents from running more than one instance of installer and sets default state of checkboxes
|
||||||
Function .onInit
|
Function .onInit
|
||||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "SyncplayMutex") i .r1 ?e'
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "SyncplayMutex") i .r1 ?e'
|
||||||
|
@ -181,7 +181,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
Push $${LANG_POLISH}
|
Push $${LANG_POLISH}
|
||||||
Push Polski
|
Push Polski
|
||||||
Push $${LANG_RUSSIAN}
|
Push $${LANG_RUSSIAN}
|
||||||
Push Russian
|
Push Русский
|
||||||
Push A ; A means auto count languages
|
Push A ; A means auto count languages
|
||||||
LangDLL::LangDialog "Language Selection" "Please select the language of Syncplay and the installer"
|
LangDLL::LangDialog "Language Selection" "Please select the language of Syncplay and the installer"
|
||||||
Pop $$LANGUAGE
|
Pop $$LANGUAGE
|
||||||
|
@ -234,13 +234,13 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
$${NSD_CreateLabel} 8u 85u 187u 10u "$$(^Shortcut)"
|
$${NSD_CreateLabel} 8u 85u 187u 10u "$$(^Shortcut)"
|
||||||
Pop $$Label_Shortcut
|
Pop $$Label_Shortcut
|
||||||
|
|
||||||
$${NSD_CreateCheckbox} 8u 98u 50u 10u "$$(^StartMenu)"
|
$${NSD_CreateCheckbox} 8u 98u 60u 10u "$$(^StartMenu)"
|
||||||
Pop $$CheckBox_StartMenuShortcut
|
Pop $$CheckBox_StartMenuShortcut
|
||||||
|
|
||||||
$${NSD_CreateCheckbox} 68u 98u 50u 10u "$$(^Desktop)"
|
$${NSD_CreateCheckbox} 78u 98u 70u 10u "$$(^Desktop)"
|
||||||
Pop $$CheckBox_DesktopShortcut
|
Pop $$CheckBox_DesktopShortcut
|
||||||
|
|
||||||
$${NSD_CreateCheckbox} 128u 98u 150u 10u "$$(^QuickLaunchBar)"
|
$${NSD_CreateCheckbox} 158u 98u 130u 10u "$$(^QuickLaunchBar)"
|
||||||
Pop $$CheckBox_QuickLaunchShortcut
|
Pop $$CheckBox_QuickLaunchShortcut
|
||||||
|
|
||||||
$${If} $$CheckBox_Associate_State == $${BST_CHECKED}
|
$${If} $$CheckBox_Associate_State == $${BST_CHECKED}
|
||||||
|
@ -494,18 +494,18 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
IfFileExists "$$VLC_Directory\lua\intf\syncplay.lua" 0 +2
|
IfFileExists "$$VLC_Directory\lua\intf\syncplay.lua" 0 +2
|
||||||
Delete $$VLC_Directory\lua\intf\syncplay.lua
|
Delete $$VLC_Directory\lua\intf\syncplay.lua
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Section "Install"
|
Section "Install"
|
||||||
SetOverwrite on
|
SetOverwrite on
|
||||||
SetOutPath $$INSTDIR
|
SetOutPath $$INSTDIR
|
||||||
WriteUninstaller uninstall.exe
|
WriteUninstaller uninstall.exe
|
||||||
|
|
||||||
$installFiles
|
$installFiles
|
||||||
|
|
||||||
Call InstallOptions
|
Call InstallOptions
|
||||||
Call WriteRegistry
|
Call WriteRegistry
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
Call un.AssociateDel
|
Call un.AssociateDel
|
||||||
Call un.InstallOptions
|
Call un.InstallOptions
|
||||||
|
|
Loading…
Reference in New Issue