mirror of https://github.com/Syncplay/syncplay
Installer update
This commit is contained in:
parent
c0d644c4da
commit
099b407303
|
@ -187,7 +187,7 @@
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
Copyright 2013 Syncplay
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
486
setup.nsi
486
setup.nsi
|
@ -1,212 +1,292 @@
|
||||||
!include LogicLib.nsh
|
!include LogicLib.nsh
|
||||||
!include nsDialogs.nsh
|
!include nsDialogs.nsh
|
||||||
|
!define VERSION "1.2.5.0"
|
||||||
|
!define SYNCPLAY "syncplay v1.2.5"
|
||||||
|
|
||||||
|
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
|
||||||
|
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Polish.nlf"
|
||||||
|
|
||||||
|
Name "Syncplay"
|
||||||
|
OutFile "Syncplay.exe"
|
||||||
|
InstallDir $PROGRAMFILES\Syncplay
|
||||||
|
RequestExecutionLevel admin
|
||||||
|
XPStyle on
|
||||||
|
Icon resources\icon.ico ;Change DIR
|
||||||
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
Name "Syncplay"
|
VIProductVersion "${VERSION}"
|
||||||
OutFile "Syncplay.exe"
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Syncplay"
|
||||||
InstallDir $PROGRAMFILES\Syncplay
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
|
||||||
RequestExecutionLevel admin
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Syncplay"
|
||||||
XPStyle on
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Syncplay"
|
||||||
Icon resources\icon.ico ;Change DIR
|
|
||||||
SetCompressor /SOLID lzma
|
VIAddVersionKey /LANG=${LANG_POLISH} "ProductName" "Syncplay"
|
||||||
|
VIAddVersionKey /LANG=${LANG_POLISH} "FileVersion" "${VERSION}"
|
||||||
PageEx license
|
VIAddVersionKey /LANG=${LANG_POLISH} "LegalCopyright" "Syncplay"
|
||||||
|
VIAddVersionKey /LANG=${LANG_POLISH} "FileDescription" "Syncplay"
|
||||||
|
|
||||||
|
PageEx license
|
||||||
LicenseData resources\license.txt
|
LicenseData resources\license.txt
|
||||||
PageExEnd
|
PageExEnd
|
||||||
Page custom Associate
|
Page directory
|
||||||
Page directory
|
Page instFiles
|
||||||
Page instfiles
|
|
||||||
|
|
||||||
UninstPage uninstConfirm
|
UninstPage uninstConfirm
|
||||||
UninstPage instfiles
|
UninstPage instFiles
|
||||||
|
|
||||||
|
!macro APP_ASSOCIATE EXT FileCLASS DESCRIPTION COMMANDTEXT COMMAND
|
||||||
|
WriteRegStr HKCR ".${EXT}" "" "${FileCLASS}"
|
||||||
|
WriteRegStr HKCR "${FileCLASS}" "" `${DESCRIPTION}`
|
||||||
|
WriteRegStr HKCR "${FileCLASS}\shell" "" "open"
|
||||||
|
WriteRegStr HKCR "${FileCLASS}\shell\open" "" `${COMMANDTEXT}`
|
||||||
|
WriteRegStr HKCR "${FileCLASS}\shell\open\command" "" `${COMMAND}`
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
!macro APP_UNASSOCIATE EXT FileCLASS
|
||||||
|
; Backup the previously associated File class
|
||||||
|
ReadRegStr $R0 HKCR ".${EXT}" `${FileCLASS}_backup`
|
||||||
|
WriteRegStr HKCR ".${EXT}" "" "$R0"
|
||||||
|
|
||||||
|
DeleteRegKey HKCR `${FileCLASS}`
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
;Associates extensions with Syncplay
|
||||||
|
Function Associate
|
||||||
|
!insertmacro APP_ASSOCIATE "mkv" "Syncplay.mkv" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "mp4" "Syncplay.mp4" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "avi" "Syncplay.avi" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "flv" "Syncplay.flv" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "mpg" "Syncplay.mpg" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "rmvb" "Syncplay.rmvb" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "vob" "Syncplay.vob" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "swf" "Syncplay.swf" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
!insertmacro APP_ASSOCIATE "wmv" "Syncplay.wmv" "$INSTDIR\Syncplay.exe,%1%" \
|
||||||
|
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function WriteRegistry
|
||||||
|
WriteRegStr HKLM SOFTWARE\Syncplay "Install_Dir" "$INSTDIR"
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "DisplayName" "Syncplay"
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "NoModify" 1
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "NoRepair" 1
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
|
Function WriteFiles
|
||||||
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Polish.nlf"
|
File "${SYNCPLAY}\Syncplay.exe"
|
||||||
|
File "${SYNCPLAY}\syncplayClientForceConfiguration.bat"
|
||||||
LangString Assoc ${LANG_ENGLISH} "Associate Syncplay with following extensions."
|
File "${SYNCPLAY}\syncplayServer.exe"
|
||||||
LangString Assoc ${LANG_POLISH} "Skojarz Syncplay z nastêpuj¹cymi rozszerzeniami."
|
File "${SYNCPLAY}\w9xpopen.exe"
|
||||||
|
File "${SYNCPLAY}\python27.dll"
|
||||||
Var hCtl_Associate
|
FunctionEnd
|
||||||
Var hCtl_Associate_Label1
|
|
||||||
Var hCtl_Associate_Bitmap1
|
Function WriteFilesLib
|
||||||
Var hCtl_Associate_Bitmap1_hImage
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-Debug-L1-1-0.dll"
|
||||||
Var hCtl_Associate_mkv
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-DelayLoad-L1-1-0.dll"
|
||||||
Var hCtl_Associate_mp4
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-ErrorHandling-L1-1-0.dll"
|
||||||
Var hCtl_Associate_avi
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-File-L1-1-0.dll"
|
||||||
Var hCtl_Associate_flv
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-Handle-L1-1-0.dll"
|
||||||
Var hCtl_Associate_mpg
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-Heap-L1-1-0.dll"
|
||||||
Var hCtl_Associate_rmvb
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-IO-L1-1-0.dll"
|
||||||
Var hCtl_Associate_vob
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-Interlocked-L1-1-0.dll"
|
||||||
Var hCtl_Associate_swf
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-LibraryLoader-L1-1-0.dll"
|
||||||
Var hCtl_Associate_wmv
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-LocalRegistry-L1-1-0.dll"
|
||||||
Var State_mkv
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-Localization-L1-1-0.dll"
|
||||||
Var State_mp4
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-Misc-L1-1-0.dll"
|
||||||
Var State_avi
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll"
|
||||||
Var State_flv
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-ProcessThreads-L1-1-0.dll"
|
||||||
Var State_mpg
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-ProFile-L1-1-0.dll"
|
||||||
Var State_rmvb
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-String-L1-1-0.dll"
|
||||||
Var State_vob
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-Synch-L1-1-0.dll"
|
||||||
Var State_swf
|
File "${SYNCPLAY}\lib\API-MS-Win-Core-SysInfo-L1-1-0.dll"
|
||||||
Var State_wmv
|
File "${SYNCPLAY}\lib\DNSAPI.DLL"
|
||||||
Var ImageHandle
|
File "${SYNCPLAY}\lib\MSIMG32.DLL"
|
||||||
|
File "${SYNCPLAY}\lib\NSI.dll"
|
||||||
; dialog create function
|
File "${SYNCPLAY}\lib\USP10.DLL"
|
||||||
Function fnc_Associate_Create
|
File "${SYNCPLAY}\lib\_ctypes.pyd"
|
||||||
|
File "${SYNCPLAY}\lib\_hashlib.pyd"
|
||||||
; === Associate (type: Dialog) ===
|
File "${SYNCPLAY}\lib\_socket.pyd"
|
||||||
nsDialogs::Create 1018
|
File "${SYNCPLAY}\lib\_win32sysloader.pyd"
|
||||||
Pop $hCtl_Associate
|
File "${SYNCPLAY}\lib\atk.pyd"
|
||||||
${If} $hCtl_Associate == error
|
File "${SYNCPLAY}\lib\bz2.pyd"
|
||||||
Abort
|
File "${SYNCPLAY}\lib\cairo._cairo.pyd"
|
||||||
${EndIf}
|
File "${SYNCPLAY}\lib\freetype6.dll"
|
||||||
|
File "${SYNCPLAY}\lib\gio._gio.pyd"
|
||||||
; === Label1 (type: Label) ===
|
File "${SYNCPLAY}\lib\glib._glib.pyd"
|
||||||
${NSD_CreateLabel} 25u 0u 269u 12u "$(Assoc)"
|
File "${SYNCPLAY}\lib\gobject._gobject.pyd"
|
||||||
Pop $hCtl_Associate_Label1
|
File "${SYNCPLAY}\lib\gtk._gtk.pyd"
|
||||||
|
File "${SYNCPLAY}\lib\intl.dll"
|
||||||
; === Bitmap1 (type: Bitmap) ===
|
File "${SYNCPLAY}\lib\libatk-1.0-0.dll"
|
||||||
${NSD_CreateIcon} 0u 0u 22u 20u ""
|
File "${SYNCPLAY}\lib\libcairo-2.dll"
|
||||||
Pop $hCtl_Associate_Bitmap1
|
File "${SYNCPLAY}\lib\libexpat-1.dll"
|
||||||
|
File "${SYNCPLAY}\lib\libfontconfig-1.dll"
|
||||||
${NSD_SetIcon} $hCtl_Associate_Bitmap1 resources\icon.ico $ImageHandle ;ChangeDir
|
File "${SYNCPLAY}\lib\libgdk-win32-2.0-0.dll"
|
||||||
|
File "${SYNCPLAY}\lib\libgdk_pixbuf-2.0-0.dll"
|
||||||
; === mkv (type: Checkbox) ===
|
File "${SYNCPLAY}\lib\libgio-2.0-0.dll"
|
||||||
${NSD_CreateCheckbox} 5u 26u 68u 14u ".mkv"
|
File "${SYNCPLAY}\lib\libglib-2.0-0.dll"
|
||||||
Pop $hCtl_Associate_mkv
|
File "${SYNCPLAY}\lib\libgmodule-2.0-0.dll"
|
||||||
|
File "${SYNCPLAY}\lib\libgobject-2.0-0.dll"
|
||||||
; === mp4 (type: Checkbox) ===
|
File "${SYNCPLAY}\lib\libgthread-2.0-0.dll"
|
||||||
${NSD_CreateCheckbox} 5u 43u 68u 14u ".mp4"
|
File "${SYNCPLAY}\lib\libgtk-win32-2.0-0.dll"
|
||||||
Pop $hCtl_Associate_mp4
|
File "${SYNCPLAY}\lib\libpango-1.0-0.dll"
|
||||||
|
File "${SYNCPLAY}\lib\libpangocairo-1.0-0.dll"
|
||||||
; === avi (type: Checkbox) ===
|
File "${SYNCPLAY}\lib\libpangoft2-1.0-0.dll"
|
||||||
${NSD_CreateCheckbox} 5u 60u 68u 14u ".avi"
|
File "${SYNCPLAY}\lib\libpangowin32-1.0-0.dll"
|
||||||
Pop $hCtl_Associate_avi
|
File "${SYNCPLAY}\lib\libpng14-14.dll"
|
||||||
|
File "${SYNCPLAY}\lib\libsync"
|
||||||
; === flv (type: Checkbox) ===
|
File "${SYNCPLAY}\lib\pango.pyd"
|
||||||
${NSD_CreateCheckbox} 87u 26u 68u 14u ".flv"
|
File "${SYNCPLAY}\lib\pangocairo.pyd"
|
||||||
Pop $hCtl_Associate_flv
|
File "${SYNCPLAY}\lib\pyexpat.pyd"
|
||||||
|
File "${SYNCPLAY}\lib\pythoncom27.dll"
|
||||||
; === mpg (type: Checkbox) ===
|
File "${SYNCPLAY}\lib\pywintypes27.dll"
|
||||||
${NSD_CreateCheckbox} 87u 43u 68u 14u ".mpg"
|
File "${SYNCPLAY}\lib\select.pyd"
|
||||||
Pop $hCtl_Associate_mpg
|
File "${SYNCPLAY}\lib\twisted.python._initgroups.pyd"
|
||||||
|
File "${SYNCPLAY}\lib\unicodedata.pyd"
|
||||||
; === rmvb (type: Checkbox) ===
|
File "${SYNCPLAY}\lib\win32api.pyd"
|
||||||
${NSD_CreateCheckbox} 87u 60u 68u 14u ".rmvb"
|
File "${SYNCPLAY}\lib\win32gui.pyd"
|
||||||
Pop $hCtl_Associate_rmvb
|
File "${SYNCPLAY}\lib\zlib1.dll"
|
||||||
|
File "${SYNCPLAY}\lib\zope.interface._zope_interface_coptimizations.pyd"
|
||||||
; === vob (type: Checkbox) ===
|
FunctionEnd
|
||||||
${NSD_CreateCheckbox} 169u 26u 68u 14u ".vob"
|
|
||||||
Pop $hCtl_Associate_vob
|
Function un.AssociateDel
|
||||||
|
!insertmacro APP_UNASSOCIATE "mkv" "Syncplay.mkv"
|
||||||
; === swf (type: Checkbox) ===
|
!insertmacro APP_UNASSOCIATE "mp4" "Syncplay.mp4"
|
||||||
${NSD_CreateCheckbox} 169u 43u 68u 14u ".swf"
|
!insertmacro APP_UNASSOCIATE "avi" "Syncplay.avi"
|
||||||
Pop $hCtl_Associate_swf
|
!insertmacro APP_UNASSOCIATE "flv" "Syncplay.flv"
|
||||||
|
!insertmacro APP_UNASSOCIATE "mpg" "Syncplay.mpg"
|
||||||
; === wmv (type: Checkbox) ===
|
!insertmacro APP_UNASSOCIATE "rmvb" "Syncplay.rmvb"
|
||||||
${NSD_CreateCheckbox} 169u 60u 68u 14u ".wmv"
|
!insertmacro APP_UNASSOCIATE "vob" "Syncplay.vob"
|
||||||
Pop $hCtl_Associate_wmv
|
!insertmacro APP_UNASSOCIATE "swf" "Syncplay.swf"
|
||||||
|
!insertmacro APP_UNASSOCIATE "wmv" "Syncplay.wmv"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
; dialog show function
|
Function un.DeleteFiles
|
||||||
Function Associate
|
Delete "$INSTDIR\Syncplay.exe"
|
||||||
Call fnc_Associate_Create
|
Delete "$INSTDIR\syncplayClientForceConfiguration.bat"
|
||||||
nsDialogs::Show $hCtl_Associate
|
Delete "$INSTDIR\syncplayServer.exe "
|
||||||
${NSD_FreeImage} $ImageHandle
|
Delete "$INSTDIR\w9xpopen.exe"
|
||||||
FunctionEnd
|
Delete "$INSTDIR\python27.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Debug-L1-1-0.dll"
|
||||||
;Prevents from running more than one instance of installer
|
Delete "$INSTDIR\lib\API-MS-Win-Core-DelayLoad-L1-1-0.dll"
|
||||||
Function .onInit
|
Delete "$INSTDIR\lib\API-MS-Win-Core-ErrorHandling-L1-1-0.dll"
|
||||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Delete-L1-1-0.dll"
|
||||||
Pop $R0
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Handle-L1-1-0.dll"
|
||||||
StrCmp $R0 0 +3
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Heap-L1-1-0.dll"
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
|
Delete "$INSTDIR\lib\API-MS-Win-Core-IO-L1-1-0.dll"
|
||||||
Abort
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Interlocked-L1-1-0.dll"
|
||||||
Call Language
|
Delete "$INSTDIR\lib\API-MS-Win-Core-LibraryLoader-L1-1-0.dll"
|
||||||
FunctionEnd
|
Delete "$INSTDIR\lib\API-MS-Win-Core-LocalRegistry-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Localization-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Misc-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-ProcessThreads-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-ProDelete-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-String-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Synch-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-SysInfo-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\DNSAPI.DLL"
|
||||||
|
Delete "$INSTDIR\lib\MSIMG32.DLL"
|
||||||
|
Delete "$INSTDIR\lib\NSI.dll"
|
||||||
|
Delete "$INSTDIR\lib\USP10.DLL"
|
||||||
|
Delete "$INSTDIR\lib\_ctypes.pyd"
|
||||||
|
Delete "$INSTDIR\lib\_hashlib.pyd"
|
||||||
|
Delete "$INSTDIR\lib\_socket.pyd"
|
||||||
|
Delete "$INSTDIR\lib\_win32sysloader.pyd"
|
||||||
|
Delete "$INSTDIR\lib\atk.pyd"
|
||||||
|
Delete "$INSTDIR\lib\bz2.pyd"
|
||||||
|
Delete "$INSTDIR\lib\cairo._cairo.pyd"
|
||||||
|
Delete "$INSTDIR\lib\freetype6.dll"
|
||||||
|
Delete "$INSTDIR\lib\gio._gio.pyd"
|
||||||
|
Delete "$INSTDIR\lib\glib._glib.pyd"
|
||||||
|
Delete "$INSTDIR\lib\gobject._gobject.pyd"
|
||||||
|
Delete "$INSTDIR\lib\gtk._gtk.pyd"
|
||||||
|
Delete "$INSTDIR\lib\intl.dll"
|
||||||
|
Delete "$INSTDIR\lib\libatk-1.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libcairo-2.dll"
|
||||||
|
Delete "$INSTDIR\lib\libexpat-1.dll"
|
||||||
|
Delete "$INSTDIR\lib\libfontconfig-1.dll"
|
||||||
|
Delete "$INSTDIR\lib\libgdk-win32-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libgdk_pixbuf-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libgio-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libglib-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libgmodule-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libgobject-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libgthread-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libgtk-win32-2.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libpango-1.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libpangocairo-1.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libpangoft2-1.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libpangowin32-1.0-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\libpng14-14.dll"
|
||||||
|
Delete "$INSTDIR\lib\libsync"
|
||||||
|
Delete "$INSTDIR\lib\pango.pyd"
|
||||||
|
Delete "$INSTDIR\lib\pangocairo.pyd"
|
||||||
|
Delete "$INSTDIR\lib\pyexpat.pyd"
|
||||||
|
Delete "$INSTDIR\lib\pythoncom27.dll"
|
||||||
|
Delete "$INSTDIR\lib\pywintypes27.dll"
|
||||||
|
Delete "$INSTDIR\lib\select.pyd"
|
||||||
|
Delete "$INSTDIR\lib\twisted.python._initgroups.pyd"
|
||||||
|
Delete "$INSTDIR\lib\unicodedata.pyd"
|
||||||
|
Delete "$INSTDIR\lib\win32api.pyd"
|
||||||
|
Delete "$INSTDIR\lib\win32gui.pyd"
|
||||||
|
Delete "$INSTDIR\lib\zlib1.dll"
|
||||||
|
Delete "$INSTDIR\lib\zope.interface._zope_interface_coptimizations.pyd"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-File-L1-1-0.dll"
|
||||||
|
Delete "$INSTDIR\lib\API-MS-Win-Core-Profile-L1-1-0.dll"
|
||||||
|
RMDir "$INSTDIR\lib"
|
||||||
|
RMDir "$INSTDIR\pyt"
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
;Prevents from running more than one instance of installer
|
||||||
|
Function .onInit
|
||||||
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
|
||||||
|
Pop $R0
|
||||||
|
StrCmp $R0 0 +3
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
|
||||||
|
Abort
|
||||||
|
Call Language
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
;Language selection dialog
|
;Language selection dialog
|
||||||
Function Language
|
Function Language
|
||||||
Push ""
|
Push ""
|
||||||
Push ${LANG_ENGLISH}
|
Push ${LANG_ENGLISH}
|
||||||
Push English
|
Push English
|
||||||
Push ${LANG_POLISH}
|
Push ${LANG_POLISH}
|
||||||
Push Polski
|
Push Polski
|
||||||
Push A ; A means auto count languages
|
Push A ; A means auto count languages
|
||||||
LangDLL::LangDialog "Installer Language" "Please select the language of the installer"
|
LangDLL::LangDialog "Installer Language" "Please select the language of the installer"
|
||||||
Pop $LANGUAGE
|
Pop $LANGUAGE
|
||||||
StrCmp $LANGUAGE "cancel" 0 +2
|
StrCmp $LANGUAGE "cancel" 0 +2
|
||||||
Abort
|
Abort
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION COMMANDTEXT COMMAND
|
Section "Install"
|
||||||
WriteRegStr HKCR ".${EXT}" "" "${FILECLASS}"
|
SetOverwrite on
|
||||||
WriteRegStr HKCR "${FILECLASS}" "" `${DESCRIPTION}`
|
SetOutPath $INSTDIR
|
||||||
WriteRegStr HKCR "${FILECLASS}\shell" "" "open"
|
WriteUninstaller uninstall.exe
|
||||||
WriteRegStr HKCR "${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
|
Call Associate
|
||||||
WriteRegStr HKCR "${FILECLASS}\shell\open\command" "" `${COMMAND}`
|
Call WriteRegistry
|
||||||
!macroend
|
Call WriteFiles
|
||||||
|
SetOutPath $INSTDIR\lib
|
||||||
|
Call WriteFilesLib
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
Section "Install"
|
Section "Uninstall"
|
||||||
SetOverwrite on
|
Call un.AssociateDel
|
||||||
SetOutPath $INSTDIR
|
Call un.DeleteFiles
|
||||||
File /r "syncplay v1.2.5\*"
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay"
|
||||||
|
DeleteRegKey HKLM SOFTWARE\Syncplay
|
||||||
WriteRegStr HKLM SOFTWARE\Syncplay "Install_Dir" "$INSTDIR"
|
Delete $INSTDIR\uninstall.exe
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "DisplayName" "Syncplay"
|
RMDir $INSTDIR\lib
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
RMDir $INSTDIR\pyt
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "NoModify" 1
|
RMDir $INSTDIR
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay" "NoRepair" 1
|
SectionEnd
|
||||||
${NSD_GetState} $hCtl_Associate_mkv $State_mkv
|
|
||||||
${If} $State_mkv == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "mkv" "Syncplay.mkv" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_mp4 $State_mp4
|
|
||||||
${If} $State_mp4 == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "mp4" "Syncplay.mp4" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_avi $State_avi
|
|
||||||
${If} $State_avi == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "avi" "Syncplay.avi" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_flv $State_flv
|
|
||||||
${If} $State_flv == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "flv" "Syncplay.flv" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_mpg $State_mpg
|
|
||||||
${If} $State_mpg == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "mpg" "Syncplay.mpg" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_rmvb $State_rmvb
|
|
||||||
${If} $State_rmvb == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "rmvb" "Syncplay.rmvb" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_vob $State_vob
|
|
||||||
${If} $State_vob == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "vob" "Syncplay.vob" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_swf $State_swf
|
|
||||||
${If} $State_swf == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "swf" "Syncplay.swf" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
${NSD_GetState} $hCtl_Associate_wmv $State_wmv
|
|
||||||
${If} $State_wmv == 0
|
|
||||||
!insertmacro APP_ASSOCIATE "wmv" "Syncplay.wmv" "$INSTDIR\Syncplay.exe,%1%" \
|
|
||||||
"Open with Syncplay" "$INSTDIR\Syncplay.exe $\"%1$\""
|
|
||||||
${EndIf}
|
|
||||||
WriteUninstaller uninstall.exe
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Section "Uninstall"
|
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Syncplay"
|
|
||||||
DeleteRegKey HKLM SOFTWARE\Syncplay
|
|
||||||
RMDir /r $INSTDIR
|
|
||||||
SectionEnd
|
|
Loading…
Reference in New Issue