chore: remove unnecessary installer files

This commit is contained in:
Rim 2024-05-14 17:51:37 -04:00
parent c7427caacd
commit e7b4c63dcd
48 changed files with 3 additions and 11402 deletions

View File

@ -1 +0,0 @@
/build

View File

@ -1,191 +0,0 @@
# Header, don't edit
NLF v6
# Start editing here
# Language ID
1033
# Font and size - dash (-) means default
-
-
# Codepage - dash (-) means ASCII code page
-
# RTL - anything else than RTL means LTR
-
# Translation by ..... (any credits should go here)
# ^Branding
t7x Installer - Free and Open Source Software
# ^SetupCaption
$(^Name) Setup
# ^UninstallCaption
$(^Name) Uninstall
# ^LicenseSubCaption
: License Agreement
# ^ComponentsSubCaption
: Installation Options
# ^DirSubCaption
: Installation Folder
# ^InstallingSubCaption
: Installing
# ^CompletedSubCaption
: Completed
# ^UnComponentsSubCaption
: Uninstallation Options
# ^UnDirSubCaption
: Uninstallation Folder
# ^ConfirmSubCaption
: Confirmation
# ^UninstallingSubCaption
: Uninstalling
# ^UnCompletedSubCaption
: Completed
# ^BackBtn
< &Back
# ^NextBtn
&Next >
# ^AgreeBtn
I &Agree
# ^AcceptBtn
I &accept the terms of the License Agreement
# ^DontAcceptBtn
I &do not accept the terms of the License Agreement
# ^InstallBtn
&Install
# ^UninstallBtn
&Uninstall
# ^CancelBtn
Cancel
# ^CloseBtn
&Close
# ^BrowseBtn
B&rowse...
# ^ShowDetailsBtn
Show &details
# ^ClickNext
Click Next to continue.
# ^ClickInstall
Click Install to start the installation.
# ^ClickUninstall
Click Uninstall to start the uninstallation.
# ^Name
Name
# ^Completed
Completed
# ^LicenseText
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^LicenseTextCB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^LicenseTextRB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^UnLicenseText
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^UnLicenseTextCB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^UnLicenseTextRB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^Custom
Custom
# ^ComponentsText
Check the components you want to install and uncheck the components you don't want to install. $_CLICK
# ^ComponentsSubText1
Select the type of install:
# ^ComponentsSubText2_NoInstTypes
Select components to install:
# ^ComponentsSubText2
Or, select the optional components you wish to install:
# ^UnComponentsText
Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK
# ^UnComponentsSubText1
Select the type of uninstall:
# ^UnComponentsSubText2_NoInstTypes
Select components to uninstall:
# ^UnComponentsSubText2
Or, select the optional components you wish to uninstall:
# ^DirText
Setup will install $(^NameDA) in the following folder. Enter the path to your Call of Duty Black Ops III game folder, or click Browse and select the game folder. $_CLICK
# ^DirSubText
Destination Folder
# ^DirBrowseText
Select the folder to install $(^NameDA) in:
# ^UnDirText
Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK
# ^UnDirSubText
""
# ^UnDirBrowseText
Select the folder to uninstall $(^NameDA) from:
# ^SpaceAvailable
"Space available: "
# ^SpaceRequired
"Space required: "
# ^UninstallingText
$(^NameDA) will be uninstalled from the following folder. $_CLICK
# ^UninstallingSubText
Uninstalling from:
# ^FileError
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.
# ^FileError_NoIgnore
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.
# ^CantWrite
"Can't write: "
# ^CopyFailed
Copy failed
# ^CopyTo
"Copy to "
# ^Registering
"Registering: "
# ^Unregistering
"Unregistering: "
# ^SymbolNotFound
"Could not find symbol: "
# ^CouldNotLoad
"Could not load: "
# ^CreateFolder
"Create folder: "
# ^CreateShortcut
"Create shortcut: "
# ^CreatedUninstaller
"Created uninstaller: "
# ^Delete
"Delete file: "
# ^DeleteOnReboot
"Delete on reboot: "
# ^ErrorCreatingShortcut
"Error creating shortcut: "
# ^ErrorCreating
"Error creating: "
# ^ErrorDecompressing
Error decompressing data! Corrupted installer?
# ^ErrorRegistering
Error registering DLL
# ^ExecShell
"ExecShell: "
# ^Exec
"Execute: "
# ^Extract
"Extract: "
# ^ErrorWriting
"Extract: error writing to file "
# ^InvalidOpcode
Installer corrupted: invalid opcode
# ^NoOLE
"No OLE for: "
# ^OutputFolder
"Output folder: "
# ^RemoveFolder
"Remove folder: "
# ^RenameOnReboot
"Rename on reboot: "
# ^Rename
"Rename: "
# ^Skipped
"Skipped: "
# ^CopyDetails
Copy Details To Clipboard
# ^LogInstall
Log install process
# ^Byte
B
# ^Kilo
K
# ^Mega
M
# ^Giga
G

View File

@ -1,129 +0,0 @@
;Language: English (1033)
;By Joost Verburg
!insertmacro LANGFILE "English" "English" "English" "English" ; See \Include\LangFile.nsh for a description of these parameters
!ifdef MUI_WELCOMEPAGE
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Setup"
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup will guide you through the installation of the $(^NameDA) Client for Call of Duty Black Ops III.$\r$\n$\r$\nIt is recommended that you close all other applications before installing.$\r$\n$\r$\nYou will not need to restart your computer after installation.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_UNWELCOMEPAGE
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Uninstaller"
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Setup will guide you through the uninstallation of $(^NameDA).$\r$\n$\r$\nBefore starting the uninstallation, make sure $(^NameDA) is not running.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_LICENSEPAGE
${LangFileString} MUI_TEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Please review the license terms before installing $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to install $(^NameDA). $_CLICK"
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to install $(^NameDA). $_CLICK"
!endif
!ifdef MUI_UNLICENSEPAGE
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Please review the license terms before uninstalling $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to uninstall $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
!endif
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Press Page Down to see the rest of the agreement."
!endif
!ifdef MUI_COMPONENTSPAGE
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to install."
!endif
!ifdef MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to uninstall."
!endif
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
!else
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Select a component to see its description."
!endif
!endif
!ifdef MUI_DIRECTORYPAGE
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choose Game Location"
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choose your Call of Duty Black Ops III game folder in which to install $(^NameDA)."
!endif
!ifdef MUI_UNDIRECTORYPAGE
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
!endif
!ifdef MUI_INSTFILESPAGE
${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installing"
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Please wait while $(^NameDA) is being installed."
${LangFileString} MUI_TEXT_FINISH_TITLE "Installation Complete"
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup was completed successfully."
${LangFileString} MUI_TEXT_ABORT_TITLE "Installation Aborted"
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup was not completed successfully."
!endif
!ifdef MUI_UNINSTFILESPAGE
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstalling"
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Please wait while $(^NameDA) is being uninstalled."
${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uninstallation Complete"
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall was completed successfully."
${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uninstallation Aborted"
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall was not completed successfully."
!endif
!ifdef MUI_FINISHPAGE
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Setup"
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) has been installed on your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_UNFINISHPAGE
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Uninstall"
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) has been uninstalled from your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the uninstallation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot now"
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "I want to manually reboot later"
${LangFileString} MUI_TEXT_FINISH_RUN "&Run $(^NameDA)"
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Show Readme"
${LangFileString} MUI_BUTTONTEXT_FINISH "&Finish"
!endif
!ifdef MUI_STARTMENUPAGE
${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder"
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the $(^NameDA) shortcuts."
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder."
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
!endif
!ifdef MUI_UNCONFIRMPAGE
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remove $(^NameDA) from your computer."
!endif
!ifdef MUI_ABORTWARNING
${LangFileString} MUI_TEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Setup?"
!endif
!ifdef MUI_UNABORTWARNING
${LangFileString} MUI_UNTEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Uninstall?"
!endif
!ifdef MULTIUSER_INSTALLMODEPAGE
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_TITLE "Choose Users"
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_SUBTITLE "Choose for which users you want to install $(^NameDA)."
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_TOP "Select whether you want to install $(^NameDA) only for yourself or for all users of this computer. $(^ClickNext)"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS "Install for anyone using this computer"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER "Install just for me"
!endif

View File

@ -1 +0,0 @@
SAMPLELICENSEAGREEMENT

View File

@ -12,4 +12,4 @@ All the involved parties wish that any further attempts at creating a modded cli
No other services provided by AlterWare are subject to change.
- T7x Developer(s)
- T7x Developers

View File

@ -1,23 +0,0 @@
## Scriptable installer for Call of Duty game clients
- Please feel free to contribute
### Prerequisites
- ~~[Nullsoft Scriptable Install System](https://nsis.sourceforge.io/Download)~~ (*Tools now included*)
| Game | Official |
|---------------------------------------------|:--------:|
| Call of Duty: World at War (T4) | ❌ |
| Call of Duty: Modern Warfare 2 (IW4x) | ❌ |
| Call of Duty: Black Ops (T5) | ❌ |
| Call of Duty: Modern Warfare 3 (IW5) | ❌ |
| Call of Duty: Black Ops 2 (T6) | ❌ |
| Call of Duty: Ghosts (IW6x) | ❌ |
| Call of Duty: Advanced Warfare (S1x) | ❌ |
| Call of Duty: Modern Warfare Remastered (H1) | ❌ |
| Call of Duty: Black Ops III (T7) | ☑️ |
| Call of Duty: Infinite Warfare (IW7) | ❌ |
| Call of Duty: Black Ops 4 (T8) | ☑️ |
| Call of Duty: Modern Warfare (2019) (IW8x) | ❌ |
| Call of Duty: Cold War (T9D) | ❌ |

View File

@ -1,4 +1,4 @@
@echo off
if not exist "build" mkdir "build"
tools\makensis.exe "t7x_Installer.nsi"
"tools\makensis.exe" "t7x_Installer.nsi"

View File

@ -53,7 +53,7 @@ ShowUninstDetails show
; Pages
!insertmacro MUI_PAGE_WELCOME
; !insertmacro MUI_PAGE_LICENSE "Readme.txt"
; !insertmacro MUI_PAGE_LICENSE "Contrib\Text\Readme.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

Binary file not shown.

View File

@ -1,75 +0,0 @@
!ifndef COLORS_NSH
!define COLORS_NSH
!verbose push
!verbose 3
# Squad
# Rob Segal
# Joel
# Yathosho
# Predefined HTML Hex colors
!define WHITE "FFFFFF"
!define BLACK "000000"
!define YELLOW "FFFF00"
!define RED "FF0000"
!define GREEN "00FF00"
!define BLUE "0000FF"
!define MAGENTA "FF00FF"
!define CYAN "00FFFF"
# Function to convert red , green and blue integer values to HTML Hex format
!define RGB '!insertmacro rgb2hex'
# Function to convert red, green and blue integer values to Hexadecimal (0xRRGGBB) format
!define HEX '!insertmacro rgb2hex2'
# Function to get the r value from a RGB number
!define GetRvalue '!insertmacro redvalue'
# Function to get the g value from a RGB number
!define GetGvalue '!insertmacro greenvalue'
# Function to get the b value from a RGB number
!define GetBvalue '!insertmacro bluevalue'
# Function to get the r value from a Hex number
!define GetRvalueX '!insertmacro bluevalue'
# Function to get the g value from a Hex number
!define GetGvalueX '!insertmacro greenvalue'
# Function to get the r value from a HEX number
!define GetBvalueX '!insertmacro redvalue'
!macro rgb2hex output R G B
IntFmt "${output}" "%02X" "${R}"
IntFmt "${output}" "${output}%02X" "${G}"
IntFmt "${output}" "${output}%02X" "${B}"
!macroend
!macro rgb2hex2 output R G B
IntFmt "${output}" "%02X" "${B}"
IntFmt "${output}" "${output}%02X" "${G}"
IntFmt "${output}" "${output}%02X" "${R}"
!macroend
!macro redvalue output hexval
StrCpy ${output} ${hexval} 2 0
IntFmt "${output}" "%02i" "0x${output}"
!macroend
!macro greenvalue output hexval
StrCpy ${output} ${hexval} 2 2
IntFmt "${output}" "%02i" "0x${output}"
!macroend
!macro bluevalue output hexval
StrCpy ${output} ${hexval} 2 4
IntFmt "${output}" "%02i" "0x${output}"
!macroend
!verbose pop
!endif

File diff suppressed because it is too large Load Diff

View File

@ -1,244 +0,0 @@
/*
InstallOptions.nsh
Macros and conversion functions for InstallOptions
*/
!ifndef ___NSIS__INSTALL_OPTIONS__NSH___
!define ___NSIS__INSTALL_OPTIONS__NSH___
!include LogicLib.nsh
!macro INSTALLOPTIONS_FUNCTION_READ_CONVERT
!insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS ""
!macroend
!macro INSTALLOPTIONS_UNFUNCTION_READ_CONVERT
!insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS un.
!macroend
!macro INSTALLOPTIONS_FUNCTION_WRITE_CONVERT
!insertmacro INSTALLOPTIONS_FUNCTION_NSIS2IO ""
!macroend
!macro INSTALLOPTIONS_UNFUNCTION_WRITE_CONVERT
!insertmacro INSTALLOPTIONS_FUNCTION_NSIS2IO un.
!macroend
!macro INSTALLOPTIONS_FUNCTION_NSIS2IO UNINSTALLER_FUNCPREFIX
; Convert an NSIS string to a form suitable for use by InstallOptions
; Usage:
; Push <NSIS-string>
; Call Nsis2Io
; Pop <IO-string>
Function ${UNINSTALLER_FUNCPREFIX}Nsis2Io
Exch $0 ; The source
Push $1 ; The output
Push $2 ; Temporary char
Push $3 ; Length
Push $4 ; Loop index
StrCpy $1 "" ; Initialise the output
StrLen $3 $0
IntOp $3 $3 - 1
${For} $4 0 $3
StrCpy $2 $0 1 $4
${If} $2 == '\'
StrCpy $2 '\\'
${ElseIf} $2 == '$\r'
StrCpy $2 '\r'
${ElseIf} $2 == '$\n'
StrCpy $2 '\n'
${ElseIf} $2 == '$\t'
StrCpy $2 '\t'
${EndIf}
StrCpy $1 $1$2
${Next}
StrCpy $0 $1
Pop $4
Pop $3
Pop $2
Pop $1
Exch $0
FunctionEnd
!macroend
!macro INSTALLOPTIONS_FUNCTION_IO2NSIS UNINSTALLER_FUNCPREFIX
; Convert an InstallOptions string to a form suitable for use by NSIS
; Usage:
; Push <IO-string>
; Call Io2Nsis
; Pop <NSIS-string>
Function ${UNINSTALLER_FUNCPREFIX}Io2Nsis
Exch $0 ; The source
Push $1 ; The output
Push $2 ; Temporary char
Push $3 ; Length
Push $4 ; Loop index
StrCpy $1 "" ; Initialise the output
StrLen $3 $0
IntOp $3 $3 - 1
${For} $4 0 $3
StrCpy $2 $0 2 $4
${If} $2 == '\\'
StrCpy $2 '\'
IntOp $4 $4 + 1
${ElseIf} $2 == '\r'
StrCpy $2 '$\r'
IntOp $4 $4 + 1
${ElseIf} $2 == '\n'
StrCpy $2 '$\n'
IntOp $4 $4 + 1
${ElseIf} $2 == '\t'
StrCpy $2 '$\t'
IntOp $4 $4 + 1
${EndIf}
StrCpy $2 $2 1
StrCpy $1 $1$2
${Next}
StrCpy $0 $1
Pop $4
Pop $3
Pop $2
Pop $1
Exch $0
FunctionEnd
!macroend
!macro INSTALLOPTIONS_EXTRACT FILE
InitPluginsDir
File "/oname=$PLUGINSDIR\${FILE}" "${FILE}"
!ifdef NSIS_UNICODE
InstallOptions::make_unicode "$PLUGINSDIR\${FILE}"
!endif
!insertmacro INSTALLOPTIONS_WRITE "${FILE}" "Settings" "RTL" "$(^RTL)"
!macroend
!macro INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
InitPluginsDir
File "/oname=$PLUGINSDIR\${FILENAME}" "${FILE}"
!ifdef NSIS_UNICODE
InstallOptions::make_unicode "$PLUGINSDIR\${FILENAME}"
!endif
!insertmacro INSTALLOPTIONS_WRITE "${FILENAME}" "Settings" "RTL" "$(^RTL)"
!macroend
!macro INSTALLOPTIONS_DISPLAY FILE
Push $0
InstallOptions::dialog "$PLUGINSDIR\${FILE}"
Pop $0
Pop $0
!macroend
!macro INSTALLOPTIONS_DISPLAY_RETURN FILE
InstallOptions::dialog "$PLUGINSDIR\${FILE}"
!macroend
!macro INSTALLOPTIONS_INITDIALOG FILE
InstallOptions::initDialog "$PLUGINSDIR\${FILE}"
!macroend
!macro INSTALLOPTIONS_SHOW
Push $0
InstallOptions::show
Pop $0
Pop $0
!macroend
!macro INSTALLOPTIONS_SHOW_RETURN
InstallOptions::show
!macroend
!macro INSTALLOPTIONS_READ VAR FILE SECTION KEY
ReadIniStr ${VAR} "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}"
!macroend
!macro INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
WriteIniStr "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}" "${VALUE}"
!macroend
!macro INSTALLOPTIONS_READ_CONVERT VAR FILE SECTION KEY
ReadIniStr ${VAR} "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}"
Push ${VAR}
Call Io2Nsis
Pop ${VAR}
!macroend
!macro INSTALLOPTIONS_READ_UNCONVERT VAR FILE SECTION KEY
ReadIniStr ${VAR} "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}"
Push ${VAR}
Call un.Io2Nsis
Pop ${VAR}
!macroend
!macro INSTALLOPTIONS_WRITE_CONVERT FILE SECTION KEY VALUE
Push $0
StrCpy $0 "${VALUE}"
Push $0
Call Nsis2Io
Pop $0
WriteIniStr "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}" $0
Pop $0
!macroend
!macro INSTALLOPTIONS_WRITE_UNCONVERT FILE SECTION KEY VALUE
Push $0
StrCpy $0 "${VALUE}"
Push $0
Call un.Nsis2Io
Pop $0
WriteIniStr "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}" $0
Pop $0
!macroend
!endif # ___NSIS__INSTALL_OPTIONS__NSH___

View File

@ -1,44 +0,0 @@
!verbose push 3
!ifndef INTEGRATION_INCLUDED
!define INTEGRATION_INCLUDED 1
!include "Util.nsh"
!define NotifyShell_AssocChanged `System::Call 'SHELL32::SHChangeNotify(i0x8000000,i0,p0,p0)'` ; Notify the shell with SHCNE_ASSOCCHANGED
!define UnpinShortcut "!insertmacro UnpinShortcut "
!macro UnpinShortcut lnkpath
Push "${lnkpath}"
${CallArtificialFunction} UnpinShortcut_Implementation
!macroend
!macro UnpinShortcut_Implementation
!include "LogicLib.nsh"
!include "Win\COM.nsh"
Exch $0
Push $1
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} ${IID_IStartMenuPinnedList} r1 ""
${If} $1 P<> 0
System::Call 'SHELL32::SHCreateItemFromParsingName(wr0,p0,g"${IID_IShellItem}",*p0r0)'
${If} $0 P<> 0
${IStartMenuPinnedList::RemoveFromList} $1 '(r0)'
${IUnknown::Release} $0 ""
${EndIf}
${IUnknown::Release} $1 ""
!ifdef NSIS_IX86 | NSIS_AMD64
${Else}
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} "{ec35e37a-6579-4f3c-93cd-6e62c4ef7636}" r1 ""
${If} $1 P<> 0
ExecShellWait /INVOKEIDLIST "unpin" $0 ; WinXP
${IUnknown::Release} $1 ""
${EndIf}
!endif
${EndIf}
Pop $1
Pop $0
!macroend
!endif #!INCLUDED
!verbose pop

View File

@ -1,885 +0,0 @@
#
# Library.nsh
#
# A system for the installation and uninstallation of dynamic
# link libraries (DLL) and type libraries (TLB). Using this
# system you can handle the complete setup with one single
# line of code:
#
# * File copying
# * File copying on reboot
# * Version checks
# * Registration and unregistration
# * Registration and unregistration on reboot
# * Shared DLL counting
# * Windows File Protection checks
#
# For more information, read appendix B in the documentation.
#
!verbose push
!verbose 3
!ifndef LIB_INCLUDED
!define LIB_INCLUDED
!ifndef SHCNE_ASSOCCHANGED
!define SHCNE_ASSOCCHANGED 0x08000000
!endif
!ifndef SHCNF_IDLIST
!define SHCNF_IDLIST 0x0000
!endif
!define REGTOOL_VERSION v3
!define REGTOOL_KEY NSIS.Library.RegTool.${REGTOOL_VERSION}
!include LogicLib.nsh
!include x64.nsh
### GetParent macro, don't pass $1 or $2 as INPUT or OUTPUT
!macro __InstallLib_Helper_GetParent INPUT OUTPUT
# Copied from FileFunc.nsh
StrCpy ${OUTPUT} ${INPUT}
Push $1
Push $2
StrCpy $2 ${OUTPUT} 1 -1
StrCmp $2 '\' 0 +3
StrCpy ${OUTPUT} ${OUTPUT} -1
goto -3
StrCpy $1 0
IntOp $1 $1 - 1
StrCpy $2 ${OUTPUT} 1 $1
StrCmp $2 '\' +2
StrCmp $2 '' 0 -3
StrCpy ${OUTPUT} ${OUTPUT} $1
Pop $2
Pop $1
!macroend
### Initialize session id (GUID)
!macro __InstallLib_Helper_InitSession
!ifndef __InstallLib_SessionGUID_Defined
!define __InstallLib_SessionGUID_Defined
Var /GLOBAL __INSTALLLLIB_SESSIONGUID
!endif
!define __InstallLib_Helper_InitSession_Label "Library_${__FILE__}${__LINE__}"
StrCmp $__INSTALLLLIB_SESSIONGUID '' 0 "${__InstallLib_Helper_InitSession_Label}"
System::Call 'ole32::CoCreateGuid(g .s)'
Pop $__INSTALLLLIB_SESSIONGUID
"${__InstallLib_Helper_InitSession_Label}:"
!undef __InstallLib_Helper_InitSession_Label
!macroend
### Add a RegTool entry to register after reboot
!macro __InstallLib_Helper_AddRegToolEntry mode filename tempdir
Push $R0
Push $R1
Push $R2
Push $R3
;------------------------
;Copy the parameters
Push "${filename}"
Push "${tempdir}"
Pop $R2 ; temporary directory
Pop $R1 ; file name to register
;------------------------
;Initialize session id
!insertmacro __InstallLib_Helper_InitSession
;------------------------
;Advance counter
StrCpy $R0 0
ReadRegDWORD $R0 HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "count"
IntOp $R0 $R0 + 1
WriteRegDWORD HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "count" "$R0"
;------------------------
;Setup RegTool
!if ! /FileExists "${NSISDIR}\Bin\RegTool-${NSIS_CPU}.bin"
!error "Missing RegTool for ${NSIS_CPU}!"
!endif
ReadRegStr $R3 HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "${REGTOOL_KEY}"
StrCpy $R3 $R3 -4 1
IfFileExists $R3 +3
File /oname=$R2\${REGTOOL_KEY}.$__INSTALLLLIB_SESSIONGUID.exe "${NSISDIR}\Bin\RegTool-${NSIS_CPU}.bin"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
"${REGTOOL_KEY}" '"$R2\${REGTOOL_KEY}.$__INSTALLLLIB_SESSIONGUID.exe" /S'
;------------------------
;Add RegTool entry
WriteRegStr HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "$R0.file" "$R1"
WriteRegStr HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "$R0.mode" "${mode}"
Pop $R3
Pop $R2
Pop $R1
Pop $R0
!macroend
!macro __InstallLib_Helper_CmpPackedVer64 oldhi oldlo newhi newlo jeq jle jgt
IntCmpU ${oldhi} ${newhi} "0" "${jle}" "${jgt}"
IntCmpU ${oldlo} ${newlo} "${jeq}" "${jle}" "${jgt}"
!macroend
### Get library version
!macro __InstallLib_Helper_GetVersion TYPE FILE
!if "${TYPE}" == "D"
!getdllversion /NoErrors /Packed "${FILE}" LIBRARY_VERSION_
!else if "${TYPE}" == "T"
!gettlbversion /NoErrors /Packed "${FILE}" LIBRARY_VERSION_
!endif
; Emulate the old LibraryLocal defines
!ifndef LIBRARY_VERSION_HIGH
!define LIBRARY_VERSION_FILENOTFOUND
!else if "${LIBRARY_VERSION_HIGH}" == ""
!define LIBRARY_VERSION_NONE
!undef LIBRARY_VERSION_HIGH
!undef LIBRARY_VERSION_LOW
!endif
!macroend
### Install library
!macro InstallLib libtype shared install localfile destfile tempbasedir
!verbose push
!verbose 3
Push $R0
Push $R1
Push $R2
Push $R3
Push $R4
Push $R5
;------------------------
;Define
!define INSTALLLIB_UNIQUE "${__FILE__}${__LINE__}"
!define INSTALLLIB_LIBTYPE_${libtype}
!define INSTALLLIB_LIBTYPE_SET INSTALLLIB_LIBTYPE_${libtype}
!define INSTALLLIB_SHARED_${shared}
!define INSTALLLIB_SHARED_SET INSTALLLIB_SHARED_${shared}
!define INSTALLLIB_INSTALL_${install}
!define INSTALLLIB_INSTALL_SET INSTALLLIB_INSTALL_${install}
;------------------------
;Validate
!ifndef INSTALLLIB_LIBTYPE_DLL & INSTALLLIB_LIBTYPE_REGDLL & INSTALLLIB_LIBTYPE_TLB & \
INSTALLLIB_LIBTYPE_REGDLLTLB & INSTALLLIB_LIBTYPE_REGEXE
!error "InstallLib: Incorrect setting for parameter: libtype"
!endif
!ifndef INSTALLLIB_INSTALL_REBOOT_PROTECTED & INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED & \
INSTALLLIB_INSTALL_NOREBOOT_PROTECTED & INSTALLLIB_INSTALL_NOREBOOT_NOTPROTECTED
!error "InstallLib: Incorrect setting for parameter: install"
!endif
;------------------------
;x64 settings
!ifdef LIBRARY_X64
${DisableX64FSRedirection}
!endif
;------------------------
;Copy the parameters used on run-time to a variable
;This allows the usage of variables as parameter
StrCpy $R4 "${destfile}"
StrCpy $R5 "${tempbasedir}"
;------------------------
;Shared library count
!ifndef INSTALLLIB_SHARED_NOTSHARED
StrCmp ${shared} "" 0 "installlib.noshareddllincrease_${INSTALLLIB_UNIQUE}"
!ifdef LIBRARY_X64
SetRegView 64
!endif
ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R4
ClearErrors
IntOp $R0 $R0 + 1
WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R4 $R0
!ifdef LIBRARY_X64
SetRegView lastused
!endif
"installlib.noshareddllincrease_${INSTALLLIB_UNIQUE}:"
!endif
;------------------------
;Check Windows File Protection
!ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_NOREBOOT_PROTECTED
!define LIBRARY_DEFINE_DONE_LABEL
System::Call "sfc::SfcIsFileProtected(i 0, w R4) i.R0"
StrCmp $R0 "error" "installlib.notprotected_${INSTALLLIB_UNIQUE}"
StrCmp $R0 "0" "installlib.notprotected_${INSTALLLIB_UNIQUE}"
Goto "installlib.done_${INSTALLLIB_UNIQUE}"
"installlib.notprotected_${INSTALLLIB_UNIQUE}:"
!endif
;------------------------
;Check file
IfFileExists $R4 0 "installlib.copy_${INSTALLLIB_UNIQUE}"
;------------------------
;Get version information
!ifndef LIBRARY_IGNORE_VERSION
!insertmacro __InstallLib_Helper_GetVersion D "${LOCALFILE}"
!ifdef LIBRARY_VERSION_FILENOTFOUND
!error "InstallLib: The library ${LOCALFILE} could not be found."
!endif
!ifndef LIBRARY_VERSION_NONE
!define LIBRARY_DEFINE_UPGRADE_LABEL
!define LIBRARY_DEFINE_REGISTER_LABEL
StrCpy $R0 ${LIBRARY_VERSION_HIGH}
StrCpy $R1 ${LIBRARY_VERSION_LOW}
GetDLLVersion $R4 $R2 $R3
!undef LIBRARY_VERSION_HIGH
!undef LIBRARY_VERSION_LOW
!ifndef INSTALLLIB_LIBTYPE_TLB & INSTALLLIB_LIBTYPE_REGDLLTLB
!ifdef LIBRARY_INSTALL_EQUAL_VERSION
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!endif
!else
!insertmacro __InstallLib_Helper_GetVersion T "${LOCALFILE}"
!ifdef LIBRARY_VERSION_FILENOTFOUND
!error "InstallLib: The library ${LOCALFILE} could not be found."
!endif
!ifndef LIBRARY_VERSION_NONE
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 0 \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
!ifdef LIBRARY_INSTALL_EQUAL_VERSION
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!endif
!endif
!endif
!else
!undef LIBRARY_VERSION_NONE
!ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
!insertmacro __InstallLib_Helper_GetVersion T "${LOCALFILE}"
!endif
!endif
!ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
!ifndef LIBRARY_VERSION_NONE
!ifndef LIBRARY_DEFINE_UPGRADE_LABEL
!define LIBRARY_DEFINE_UPGRADE_LABEL
!endif
!ifndef LIBRARY_DEFINE_REGISTER_LABEL
!define LIBRARY_DEFINE_REGISTER_LABEL
!endif
StrCpy $R0 ${LIBRARY_VERSION_HIGH}
StrCpy $R1 ${LIBRARY_VERSION_LOW}
TypeLib::GetLibVersion $R4
Pop $R3
Pop $R2
!ifdef LIBRARY_INSTALL_EQUAL_VERSION
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!else
!insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
"installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
!endif
!undef LIBRARY_VERSION_HIGH
!undef LIBRARY_VERSION_LOW
!else
!undef LIBRARY_VERSION_NONE
!endif
!endif
!endif ;~LIBRARY_IGNORE_VERSION
;------------------------
;Upgrade
!ifdef LIBRARY_DEFINE_UPGRADE_LABEL
!undef LIBRARY_DEFINE_UPGRADE_LABEL
"installlib.upgrade_${INSTALLLIB_UNIQUE}:"
!endif
;------------------------
;Copy
!ifdef INSTALLLIB_INSTALL_NOREBOOT_PROTECTED | INSTALLLIB_INSTALL_NOREBOOT_NOTPROTECTED
"installlib.copy_${INSTALLLIB_UNIQUE}:"
StrCpy $R0 $R4
Call ":installlib.file_${INSTALLLIB_UNIQUE}"
!else
!ifndef LIBRARY_DEFINE_REGISTER_LABEL
!define LIBRARY_DEFINE_REGISTER_LABEL
!endif
!ifndef LIBRARY_DEFINE_DONE_LABEL
!define LIBRARY_DEFINE_DONE_LABEL
!endif
ClearErrors
StrCpy $R0 $R4
Call ":installlib.file_${INSTALLLIB_UNIQUE}"
IfErrors 0 "installlib.register_${INSTALLLIB_UNIQUE}"
SetOverwrite lastused
;------------------------
;Copy on reboot
GetTempFileName $R0 $R5
Call ":installlib.file_${INSTALLLIB_UNIQUE}"
Rename /REBOOTOK $R0 $R4
;------------------------
;Register on reboot
Call ":installlib.regonreboot_${INSTALLLIB_UNIQUE}"
Goto "installlib.done_${INSTALLLIB_UNIQUE}"
"installlib.copy_${INSTALLLIB_UNIQUE}:"
StrCpy $R0 $R4
Call ":installlib.file_${INSTALLLIB_UNIQUE}"
!endif
;------------------------
;Register
!ifdef LIBRARY_DEFINE_REGISTER_LABEL
!undef LIBRARY_DEFINE_REGISTER_LABEL
"installlib.register_${INSTALLLIB_UNIQUE}:"
!endif
!ifdef INSTALLLIB_LIBTYPE_REGDLL | INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB | INSTALLLIB_LIBTYPE_REGEXE
!ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
IfRebootFlag 0 "installlib.regnoreboot_${INSTALLLIB_UNIQUE}"
Call ":installlib.regonreboot_${INSTALLLIB_UNIQUE}"
Goto "installlib.registerfinish_${INSTALLLIB_UNIQUE}"
"installlib.regnoreboot_${INSTALLLIB_UNIQUE}:"
!endif
!ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
TypeLib::Register $R4
!endif
!ifdef INSTALLLIB_LIBTYPE_REGDLL | INSTALLLIB_LIBTYPE_REGDLLTLB
!ifndef LIBRARY_X64
RegDll $R4
!else
ExecWait '"$SYSDIR\regsvr32.exe" /s "$R4"'
!endif
!endif
!ifdef INSTALLLIB_LIBTYPE_REGEXE
ExecWait '"$R4" /regserver'
!endif
!ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
"installlib.registerfinish_${INSTALLLIB_UNIQUE}:"
!endif
!endif
!ifdef LIBRARY_SHELL_EXTENSION
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
!endif
!ifdef LIBRARY_COM
System::Call 'Ole32::CoFreeUnusedLibraries()'
!endif
;------------------------
;Done
!ifdef LIBRARY_DEFINE_DONE_LABEL
!undef LIBRARY_DEFINE_DONE_LABEL
"installlib.done_${INSTALLLIB_UNIQUE}:"
!endif
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Pop $R1
Pop $R0
;------------------------
;End
Goto "installlib.end_${INSTALLLIB_UNIQUE}"
;------------------------
;Extract
!ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
SetOverwrite try
!else
SetOverwrite on
!endif
"installlib.file_${INSTALLLIB_UNIQUE}:"
SetFileAttributes $R0 FILE_ATTRIBUTE_NORMAL
ClearErrors
File /oname=$R0 "${LOCALFILE}"
Return
SetOverwrite lastused
;------------------------
;Register on reboot
!ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
"installlib.regonreboot_${INSTALLLIB_UNIQUE}:"
!ifdef INSTALLLIB_LIBTYPE_REGDLL | INSTALLLIB_LIBTYPE_REGDLLTLB
!ifndef LIBRARY_X64
!insertmacro __InstallLib_Helper_AddRegToolEntry 'D' "$R4" "$R5"
!else
!insertmacro __InstallLib_Helper_AddRegToolEntry 'DX' "$R4" "$R5"
!endif
!endif
!ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
!insertmacro __InstallLib_Helper_AddRegToolEntry 'T' "$R4" "$R5"
!endif
!ifdef INSTALLLIB_LIBTYPE_REGEXE
!insertmacro __InstallLib_Helper_AddRegToolEntry 'E' "$R4" "$R5"
!endif
Return
!endif
;------------------------
;End label
"installlib.end_${INSTALLLIB_UNIQUE}:"
!ifdef LIBRARY_X64
${EnableX64FSRedirection}
!endif
;------------------------
;Undefine
!undef INSTALLLIB_UNIQUE
!undef ${INSTALLLIB_LIBTYPE_SET}
!undef INSTALLLIB_LIBTYPE_SET
!undef ${INSTALLLIB_SHARED_SET}
!undef INSTALLLIB_SHARED_SET
!undef ${INSTALLLIB_INSTALL_SET}
!undef INSTALLLIB_INSTALL_SET
!verbose pop
!macroend
### Uninstall library
!macro UnInstallLib libtype shared uninstall file
!verbose push
!verbose 3
Push $R0
Push $R1
;------------------------
;Define
!define UNINSTALLLIB_UNIQUE "${__FILE__}${__LINE__}"
!define UNINSTALLLIB_LIBTYPE_${libtype}
!define UNINSTALLLIB_LIBTYPE_SET UNINSTALLLIB_LIBTYPE_${libtype}
!define UNINSTALLLIB_SHARED_${shared}
!define UNINSTALLLIB_SHARED_SET UNINSTALLLIB_SHARED_${shared}
!define UNINSTALLLIB_UNINSTALL_${uninstall}
!define UNINSTALLLIB_UNINSTALL_SET UNINSTALLLIB_UNINSTALL_${uninstall}
;------------------------
;Validate
!ifndef UNINSTALLLIB_LIBTYPE_DLL & UNINSTALLLIB_LIBTYPE_REGDLL & UNINSTALLLIB_LIBTYPE_TLB & \
UNINSTALLLIB_LIBTYPE_REGDLLTLB & UNINSTALLLIB_LIBTYPE_REGEXE
!error "UnInstallLib: Incorrect setting for parameter: libtype"
!endif
!ifndef UNINSTALLLIB_SHARED_NOTSHARED & UNINSTALLLIB_SHARED_SHARED
!error "UnInstallLib: Incorrect setting for parameter: shared"
!endif
!ifndef UNINSTALLLIB_UNINSTALL_NOREMOVE & UNINSTALLLIB_UNINSTALL_REBOOT_PROTECTED & \
UNINSTALLLIB_UNINSTALL_REBOOT_NOTPROTECTED & UNINSTALLLIB_UNINSTALL_NOREBOOT_PROTECTED & \
UNINSTALLLIB_UNINSTALL_NOREBOOT_NOTPROTECTED
!error "UnInstallLib: Incorrect setting for parameter: uninstall"
!endif
;------------------------
;x64 settings
!ifdef LIBRARY_X64
${DisableX64FSRedirection}
!endif
;------------------------
;Copy the parameters used on run-time to a variable
;This allows the usage of variables as parameter
StrCpy $R1 "${file}"
;------------------------
;Shared library count
!ifdef UNINSTALLLIB_SHARED_SHARED
!define UNINSTALLLIB_DONE_LABEL
!ifdef LIBRARY_X64
SetRegView 64
!endif
ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
StrCmp $R0 "" "uninstalllib.shareddlldone_${UNINSTALLLIB_UNIQUE}"
IntOp $R0 $R0 - 1
IntCmp $R0 0 "uninstalllib.shareddllremove_${UNINSTALLLIB_UNIQUE}" \
"uninstalllib.shareddllremove_${UNINSTALLLIB_UNIQUE}" "uninstalllib.shareddllinuse_${UNINSTALLLIB_UNIQUE}"
"uninstalllib.shareddllremove_${UNINSTALLLIB_UNIQUE}:"
DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
!ifndef UNINSTALLLIB_SHARED_SHAREDNOREMOVE
Goto "uninstalllib.shareddlldone_${UNINSTALLLIB_UNIQUE}"
!endif
"uninstalllib.shareddllinuse_${UNINSTALLLIB_UNIQUE}:"
WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
!ifdef LIBRARY_X64
SetRegView lastused
!endif
Goto "uninstalllib.done_${UNINSTALLLIB_UNIQUE}"
"uninstalllib.shareddlldone_${UNINSTALLLIB_UNIQUE}:"
!ifdef LIBRARY_X64
SetRegView lastused
!endif
!endif
;------------------------
;Remove
!ifndef UNINSTALLLIB_UNINSTALL_NOREMOVE
;------------------------
;Check Windows File Protection
!ifdef UNINSTALLLIB_UNINSTALL_REBOOT_PROTECTED | UNINSTALLLIB_UNINSTALL_NOREBOOT_PROTECTED
!ifndef UNINSTALLLIB_DONE_LABEL
!define UNINSTALLLIB_DONE_LABEL
!endif
System::Call "sfc::SfcIsFileProtected(i 0, w $R1) i.R0"
StrCmp $R0 "error" "uninstalllib.notprotected_${UNINSTALLLIB_UNIQUE}"
StrCmp $R0 "0" "uninstalllib.notprotected_${UNINSTALLLIB_UNIQUE}"
Goto "uninstalllib.done_${UNINSTALLLIB_UNIQUE}"
"uninstalllib.notprotected_${UNINSTALLLIB_UNIQUE}:"
!endif
;------------------------
;Unregister
!ifdef UNINSTALLLIB_LIBTYPE_REGDLL | UNINSTALLLIB_LIBTYPE_REGDLLTLB
!ifndef LIBRARY_X64
UnRegDLL $R1
!else
ExecWait '"$SYSDIR\regsvr32.exe" /s /u "$R1"'
!endif
!endif
!ifdef UNINSTALLLIB_LIBTYPE_REGEXE
ExecWait '"$R1" /unregserver'
!endif
!ifdef UNINSTALLLIB_LIBTYPE_TLB | UNINSTALLLIB_LIBTYPE_REGDLLTLB
TypeLib::UnRegister $R1
!endif
!ifdef LIBRARY_SHELL_EXTENSION
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
!endif
!ifdef LIBRARY_COM
System::Call 'Ole32::CoFreeUnusedLibraries()'
!endif
;------------------------
;Delete
Delete $R1
!ifdef UNINSTALLLIB_UNINSTALL_REBOOT_PROTECTED | UNINSTALLLIB_UNINSTALL_REBOOT_NOTPROTECTED
${If} ${FileExists} $R1
# File is in use, can't just delete.
# Move file to another location before using Delete /REBOOTOK. This way, if
# the user installs a new version of the DLL, it won't be deleted after
# reboot. See bug #1097642 for more information on this.
# Try moving to $TEMP.
GetTempFileName $R0
Delete $R0
Rename $R1 $R0
${If} ${FileExists} $R1
# Still here, delete temporary file, in case the file was copied
# and not deleted. This happens when moving from network drives,
# for example.
Delete $R0
# Try moving to directory containing the file.
!insertmacro __InstallLib_Helper_GetParent $R1 $R0
GetTempFileName $R0 $R0
Delete $R0
Rename $R1 $R0
${If} ${FileExists} $R1
# Still here, delete temporary file.
Delete $R0
# Give up moving, simply Delete /REBOOTOK the file.
StrCpy $R0 $R1
${EndIf}
${EndIf}
# Delete the moved file.
Delete /REBOOTOK $R0
${EndIf}
!endif
!endif
;------------------------
;Done
!ifdef UNINSTALLLIB_DONE_LABEL
!undef UNINSTALLLIB_DONE_LABEL
"uninstalllib.done_${UNINSTALLLIB_UNIQUE}:"
!endif
!ifdef LIBRARY_X64
${EnableX64FSRedirection}
!endif
Pop $R1
Pop $R0
;------------------------
;Undefine
!undef UNINSTALLLIB_UNIQUE
!undef ${UNINSTALLLIB_LIBTYPE_SET}
!undef UNINSTALLLIB_LIBTYPE_SET
!undef ${UNINSTALLLIB_SHARED_SET}
!undef UNINSTALLLIB_SHARED_SET
!undef ${UNINSTALLLIB_UNINSTALL_SET}
!undef UNINSTALLLIB_UNINSTALL_SET
!verbose pop
!macroend
!endif
!verbose pop

View File

@ -1 +0,0 @@
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"

View File

@ -1,553 +0,0 @@
!verbose push
!verbose 3
!include LogicLib.nsh
!include Sections.nsh
!ifndef ___MEMENTO_NSH___
!define ___MEMENTO_NSH___
#####################################
### Memento ###
#####################################
/*
Memento is a set of macros that allow installers to remember user selection
across separate runs of the installer. Currently, it can remember the state
of sections and mark new sections as bold. In the future, it'll integrate
InstallOptions and maybe even the Modern UI.
A usage example can be found in `Examples\Memento.nsi`.
*/
#####################################
### Usage Instructions ###
#####################################
/*
1. Declare usage of Memento by including Memento.nsh at the top of the script.
!include Memento.nsh
2. Define MEMENTO_REGISTRY_ROOT and MEMENTO_REGISTRY_KEY with the a registry key
where sections' state should be saved.
!define MEMENTO_REGISTRY_ROOT HKLM
!define MEMENTO_REGISTRY_KEY \
Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram
3. Replace Section with ${MementoSection} and SectionEnd with ${MementoSectionEnd}
for sections that whose state should be remembered by Memento.
For sections that should be unselected by default, use ${MementoSection}'s
brother - ${MementoUnselectedSection}.
Sections that don't already have an identifier must be assigned one.
Section identifiers must stay the same across different versions of the
installer or their state will be forgotten.
4. Use ${MementoSectionDone} after the last ${MementoSection}.
5. Add a call to ${MementoSectionRestore} to .onInit to restore the state
of all sections from the registry.
Function .onInit
${MementoSectionRestore}
FunctionEnd
6. Add a call to ${MementoSectionSave} to .onInstSuccess to save the state
of all sections to the registry.
Function .onInstSuccess
${MementoSectionSave}
FunctionEnd
7. Tattoo the location of the chosen registry key on your arm.
*/
#####################################
### User API ###
#####################################
;
; ${MementoSection}
;
; Defines a section whose state is remembered by Memento.
;
; Usage is similar to Section.
;
; ${MementoSection} "name" "some_id"
;
!define MementoSection "!insertmacro MementoSection"
;
; ${MementoSectionEnd}
;
; Ends a section previously opened using ${MementoSection}.
;
; Usage is similar to SectionEnd.
;
; ${MementoSection} "name" "some_id"
; # some code...
; ${MementoSectionEnd}
;
;
; ${MementoUnselectedSection}
;
; Defines a section whose state is remembered by Memento and is
; unselected by default.
;
; Usage is similar to Section with the /o switch.
;
; ${MementoUnselectedSection} "name" "some_id"
;
!define MementoUnselectedSection "!insertmacro MementoUnselectedSection"
;
; ${MementoSectionEnd}
;
; Ends a section previously opened using ${MementoSection}.
;
; Usage is similar to SectionEnd.
;
; ${MementoSection} "name" "some_id"
; # some code...
; ${MementoSectionEnd}
;
!define MementoSectionEnd "!insertmacro MementoSectionEnd"
;
; ${MementoSectionDone}
;
; Used after all ${MementoSection} have been set.
;
; ${MementoSection} "name1" "some_id1"
; # some code...
; ${MementoSectionEnd}
;
; ${MementoSection} "name2" "some_id2"
; # some code...
; ${MementoSectionEnd}
;
; ${MementoSection} "name3" "some_id3"
; # some code...
; ${MementoSectionEnd}
;
; ${MementoSectionDone}
;
!define MementoSectionDone "!insertmacro MementoSectionDone"
;
; ${MementoSectionRestore}
;
; Restores the state of all Memento sections from the registry.
;
; Commonly used in .onInit.
;
; Function .onInit
;
; ${MementoSectionRestore}
;
; FunctionEnd
;
!define MementoSectionRestore "!insertmacro MementoSectionRestore"
;
; ${MementoSectionSave}
;
; Saves the state of all Memento sections to the registry.
;
; Commonly used in .onInstSuccess.
;
; Function .onInstSuccess
;
; ${MementoSectionSave}
;
; FunctionEnd
;
!define MementoSectionSave "!insertmacro MementoSectionSave"
;
; MementoSection<ReadWrite><Int|Marker>
;
; Replaceable macros that allow custom storage methods to be used.
;
!ifmacrondef MementoSectionReadInt
!define __MementoSectionStdRegReadWrite
!macro MementoSectionReadInt outvar name
ReadRegDWord ${outvar} ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection${name}`
!macroend
!macro MementoSectionWriteInt name val
WriteRegDWord ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection${name}` `${val}`
!macroend
!macro MementoSectionReadMarker outvar name
ReadRegStr ${outvar} ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection${name}`
!macroend
!macro MementoSectionWriteMarker name
WriteRegStr ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection${name}` ``
!macroend
!endif
#####################################
### Internal Defines ###
#####################################
!define __MementoSectionIndex 1
#####################################
### Internal Macros ###
#####################################
!macro __MementoCheckSettings
!ifdef __MementoSectionStdRegReadWrite
!ifndef MEMENTO_REGISTRY_ROOT | MEMENTO_REGISTRY_KEY
!error "MEMENTO_REGISTRY_ROOT and MEMENTO_REGISTRY_KEY must be defined before using any of Memento's macros"
!endif
!endif
!macroend
!macro __MementoSection flags name id
!insertmacro __MementoCheckSettings
!ifndef __MementoSectionIndex
!error "MementoSectionDone already used!"
!endif
!define __MementoSectionLastSectionId `${id}`
!verbose pop
Section ${flags} `${name}` `${id}`
!verbose push
!verbose 3
!macroend
#####################################
### User Macros ###
#####################################
!macro MementoSection name id
!verbose push
!verbose 3
!insertmacro __MementoSection "" `${name}` `${id}`
!verbose pop
!macroend
!macro MementoUnselectedSection name id
!verbose push
!verbose 3
!insertmacro __MementoSection /o `${name}` `${id}`
!define __MementoSectionUnselected
!verbose pop
!macroend
!macro MementoSectionEnd
SectionEnd
!verbose push
!verbose 3
!insertmacro __MementoCheckSettings
!ifndef __MementoSectionIndex
!error "MementoSectionDone already used!"
!endif
!define /MATH __MementoSectionIndexNext \
${__MementoSectionIndex} + 1
Function __MementoSectionMarkNew${__MementoSectionIndex}
ClearErrors
!insertmacro MementoSectionReadInt $0 `_${__MementoSectionLastSectionId}`
${If} ${Errors}
!insertmacro SetSectionFlag `${${__MementoSectionLastSectionId}}` ${SF_BOLD}
${EndIf}
GetFunctionAddress $0 __MementoSectionMarkNew${__MementoSectionIndexNext}
Goto $0
FunctionEnd
Function __MementoSectionRestoreStatus${__MementoSectionIndex}
ClearErrors
!insertmacro MementoSectionReadInt $0 `_${__MementoSectionLastSectionId}`
!ifndef __MementoSectionUnselected
${If} ${Errors}
${OrIf} $0 != 0
!insertmacro SelectSection `${${__MementoSectionLastSectionId}}`
${Else}
!insertmacro UnselectSection `${${__MementoSectionLastSectionId}}`
${EndIf}
!else
!undef __MementoSectionUnselected
${If} ${Errors}
${OrIf} $0 == 0
!insertmacro UnselectSection `${${__MementoSectionLastSectionId}}`
${Else}
!insertmacro SelectSection `${${__MementoSectionLastSectionId}}`
${EndIf}
!endif
GetFunctionAddress $0 __MementoSectionRestoreStatus${__MementoSectionIndexNext}
Goto $0
FunctionEnd
Function __MementoSectionSaveStatus${__MementoSectionIndex}
${If} ${SectionIsSelected} `${${__MementoSectionLastSectionId}}`
!insertmacro MementoSectionWriteInt `_${__MementoSectionLastSectionId}` 1
${Else}
!insertmacro MementoSectionWriteInt `_${__MementoSectionLastSectionId}` 0
${EndIf}
GetFunctionAddress $0 __MementoSectionSaveStatus${__MementoSectionIndexNext}
Goto $0
FunctionEnd
!undef __MementoSectionIndex
!define __MementoSectionIndex ${__MementoSectionIndexNext}
!undef __MementoSectionIndexNext
!undef __MementoSectionLastSectionId
!verbose pop
!macroend
!macro MementoSectionDone
!verbose push
!verbose 3
!insertmacro __MementoCheckSettings
Function __MementoSectionMarkNew${__MementoSectionIndex}
FunctionEnd
Function __MementoSectionRestoreStatus${__MementoSectionIndex}
FunctionEnd
Function __MementoSectionSaveStatus${__MementoSectionIndex}
FunctionEnd
!undef __MementoSectionIndex
!verbose pop
!macroend
!macro MementoSectionRestore
!verbose push
!verbose 3
!insertmacro __MementoCheckSettings
Push $0
Push $1
Push $2
Push $3
# check for first usage
ClearErrors
!insertmacro MementoSectionReadMarker $0 `Used`
${If} ${Errors}
# use script defaults on first run
Goto done
${EndIf}
# mark new components in bold
Call __MementoSectionMarkNew1
# mark section groups in bold
StrCpy $0 0
StrCpy $1 ""
StrCpy $2 ""
StrCpy $3 ""
loop:
ClearErrors
${If} ${SectionIsBold} $0
${If} $1 != ""
!insertmacro SetSectionFlag $1 ${SF_BOLD}
${EndIf}
${If} $2 != ""
!insertmacro SetSectionFlag $2 ${SF_BOLD}
${EndIf}
${If} $3 != ""
!insertmacro SetSectionFlag $3 ${SF_BOLD}
${EndIf}
${ElseIf} ${Errors}
Goto loop_end
${EndIf}
${If} ${SectionIsSectionGroup} $0
${If} $1 == ""
StrCpy $1 $0
${ElseIf} $2 == ""
StrCpy $2 $0
${ElseIf} $3 == ""
StrCpy $3 $0
${EndIf}
${EndIf}
${If} ${SectionIsSectionGroupEnd} $0
${If} $3 != ""
StrCpy $3 ""
${ElseIf} $2 != ""
StrCpy $2 ""
${ElseIf} $1 != ""
StrCpy $1 ""
${EndIf}
${EndIf}
IntOp $0 $0 + 1
Goto loop
loop_end:
# restore sections' status
Call __MementoSectionRestoreStatus1
# all done
done:
Pop $3
Pop $2
Pop $1
Pop $0
!verbose pop
!macroend
!macro MementoSectionSave
!verbose push
!verbose 3
!insertmacro __MementoCheckSettings
Push $0
!insertmacro MementoSectionWriteMarker `Used`
Call __MementoSectionSaveStatus1
Pop $0
!verbose pop
!macroend
!endif # ___MEMENTO_NSH___
!verbose pop

View File

@ -1,505 +0,0 @@
/*
MultiUser.nsh
Installer configuration for multi-user Windows environments
Copyright 2008-2023 Joost Verburg
*/
!ifndef MULTIUSER_INCLUDED
!define MULTIUSER_INCLUDED 20210216
!verbose push 3
;Standard NSIS header files
!ifdef MULTIUSER_MUI
!include MUI2.nsh
!endif
!include LogicLib.nsh
!include WinVer.nsh
!include FileFunc.nsh
!if ${NSIS_PTR_SIZE} > 4
!define /IfNDef MULTIUSER_MINWIN 0x501
!else
!define /IfNDef MULTIUSER_MINWIN 0x400
!endif
;Variables
Var MultiUser.Privileges
Var MultiUser.InstallMode
;Command line installation mode setting
!ifdef MULTIUSER_INSTALLMODE_COMMANDLINE
!include StrFunc.nsh
${Using:StrFunc} StrStr
!ifndef MULTIUSER_NOUNINSTALL
${Using:StrFunc} UnStrStr
!endif
Var MultiUser.Parameters
Var MultiUser.Result
!endif
;Installation folder stored in registry
!ifdef MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY & MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME
Var MultiUser.InstDir
!endif
!ifdef MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY & MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME
Var MultiUser.DefaultKeyValue
!endif
;Windows Vista UAC setting
!if "${MULTIUSER_EXECUTIONLEVEL}" == Admin
RequestExecutionLevel admin
!define MULTIUSER_EXECUTIONLEVEL_ALLUSERS
!else if "${MULTIUSER_EXECUTIONLEVEL}" == Power
RequestExecutionLevel admin
!define MULTIUSER_EXECUTIONLEVEL_ALLUSERS
!else if "${MULTIUSER_EXECUTIONLEVEL}" == Highest
RequestExecutionLevel highest
!define MULTIUSER_EXECUTIONLEVEL_ALLUSERS
!else
RequestExecutionLevel user
!ifndef MULTIUSER_EXECUTIONLEVEL
!warning "MULTIUSER_EXECUTIONLEVEL not set!"
!endif
!endif
/*
Install modes
*/
!macro MULTIUSER_INSTALLMODE_ALLUSERS UNINSTALLER_PREFIX UNINSTALLER_FUNCPREFIX
;Install mode initialization - per-machine
${ifnot} ${IsNT}
${orif} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
StrCpy $MultiUser.InstallMode AllUsers
SetShellVarContext all
!if "${UNINSTALLER_PREFIX}" != UN
;Set default installation location for installer
!ifdef MULTIUSER_INSTALLMODE_INSTDIR
!ifdef MULTIUSER_USE_PROGRAMFILES64
StrCpy $INSTDIR "$PROGRAMFILES64\${MULTIUSER_INSTALLMODE_INSTDIR}"
!else
StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
!endif
!endif
!endif
!ifdef MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY & MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME
ReadRegStr $MultiUser.InstDir HKLM "${MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY}" "${MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME}"
${if} $MultiUser.InstDir != ""
StrCpy $INSTDIR $MultiUser.InstDir
${endif}
!endif
!ifdef MULTIUSER_INSTALLMODE_${UNINSTALLER_PREFIX}FUNCTION
Call "${MULTIUSER_INSTALLMODE_${UNINSTALLER_PREFIX}FUNCTION}"
!endif
${endif}
!macroend
!macro MULTIUSER_INSTALLMODE_CURRENTUSER UNINSTALLER_PREFIX UNINSTALLER_FUNCPREFIX
;Install mode initialization - per-user
!if ${MULTIUSER_MINWIN} < 0x500
${if} ${IsNT}
!endif
StrCpy $MultiUser.InstallMode CurrentUser
SetShellVarContext current
!if "${UNINSTALLER_PREFIX}" != UN
;Set default installation location for installer
!ifdef MULTIUSER_INSTALLMODE_INSTDIR
!if ${MULTIUSER_MINWIN} < 0x490
${if} ${AtLeastWin2000}
!endif
GetKnownFolderPath $INSTDIR {5CD7AEE2-2219-4A67-B85D-6C9CE15660CB} ; FOLDERID_UserProgramFiles
StrCmp $INSTDIR "" 0 +2
StrCpy $INSTDIR "$LocalAppData\Programs" ; Fallback directory
StrCpy $INSTDIR "$INSTDIR\${MULTIUSER_INSTALLMODE_INSTDIR}"
!if ${MULTIUSER_MINWIN} < 0x490
${else}
StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
${endif}
!endif
!endif
!endif
!ifdef MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY & MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME
ReadRegStr $MultiUser.InstDir HKCU "${MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY}" "${MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME}"
${if} $MultiUser.InstDir != ""
StrCpy $INSTDIR $MultiUser.InstDir
${endif}
!endif
!ifdef MULTIUSER_INSTALLMODE_${UNINSTALLER_PREFIX}FUNCTION
Call "${MULTIUSER_INSTALLMODE_${UNINSTALLER_PREFIX}FUNCTION}"
!endif
!if ${MULTIUSER_MINWIN} < 0x500
${endif}
!endif
!macroend
Function MultiUser.InstallMode.AllUsers
!insertmacro MULTIUSER_INSTALLMODE_ALLUSERS "" ""
FunctionEnd
Function MultiUser.InstallMode.CurrentUser
!insertmacro MULTIUSER_INSTALLMODE_CURRENTUSER "" ""
FunctionEnd
!ifndef MULTIUSER_NOUNINSTALL
Function un.MultiUser.InstallMode.AllUsers
!insertmacro MULTIUSER_INSTALLMODE_ALLUSERS UN .un
FunctionEnd
Function un.MultiUser.InstallMode.CurrentUser
!insertmacro MULTIUSER_INSTALLMODE_CURRENTUSER UN .un
FunctionEnd
!endif
/*
Installer/uninstaller initialization
*/
!macro MULTIUSER_INIT_QUIT UNINSTALLER_FUNCPREFIX
!ifdef MULTIUSER_INIT_${UNINSTALLER_FUNCPREFIX}FUNCTIONQUIT
Call "${MULTIUSER_INIT_${UNINSTALLER_FUNCPREFIX}FUNCTIONQUIT}"
!else
Quit
!endif
!macroend
!macro MULTIUSER_INIT_TEXTS UNINSTALLER_PREFIX
!if "${UNINSTALLER_PREFIX}" == ""
!define /ReDef MULTIUSER_TMPSTR_CAPTION "$(^SetupCaption)"
!else
!define /ReDef MULTIUSER_TMPSTR_CAPTION "$(^Name)"
!endif
!define /IfNDef MULTIUSER_INIT_TEXT_ADMINREQUIRED "${MULTIUSER_TMPSTR_CAPTION} requires administrator privileges."
!define /IfNDef MULTIUSER_INIT_TEXT_POWERREQUIRED "${MULTIUSER_TMPSTR_CAPTION} requires at least Power User privileges."
!define /IfNDef MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE "Your user account does not have sufficient privileges to install $(^Name) for all users of this computer."
!undef MULTIUSER_TMPSTR_CAPTION
!macroend
!macro MULTIUSER_INIT_CHECKS UNINSTALLER_PREFIX UNINSTALLER_FUNCPREFIX
;Installer initialization - check privileges and set install mode
!insertmacro MULTIUSER_INIT_TEXTS "${UNINSTALLER_PREFIX}"
UserInfo::GetAccountType
Pop $MultiUser.Privileges
!if ${MULTIUSER_MINWIN} < 0x500
${if} ${IsNT}
!endif
;Check privileges
!if "${MULTIUSER_EXECUTIONLEVEL}" == Admin
${if} $MultiUser.Privileges != "Admin"
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_ADMINREQUIRED}"
!insertmacro MULTIUSER_INIT_QUIT "${UNINSTALLER_FUNCPREFIX}"
${endif}
!else if "${MULTIUSER_EXECUTIONLEVEL}" == Power
${if} $MultiUser.Privileges != "Power"
${andif} $MultiUser.Privileges != "Admin"
${if} ${AtMostWinXP}
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_POWERREQUIRED}"
${else}
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_ADMINREQUIRED}"
${endif}
!insertmacro MULTIUSER_INIT_QUIT "${UNINSTALLER_FUNCPREFIX}"
${endif}
!endif
!ifdef MULTIUSER_EXECUTIONLEVEL_ALLUSERS
;Default to per-machine installation if possible
${if} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
!ifndef MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
!else
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.CurrentUser
!endif
!ifdef MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY & MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME
;Set installation mode to setting from a previous installation
!ifndef MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
ReadRegStr $MultiUser.DefaultKeyValue HKLM "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY}" "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME}"
${if} $MultiUser.DefaultKeyValue == ""
ReadRegStr $MultiUser.DefaultKeyValue HKCU "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY}" "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME}"
${if} $MultiUser.DefaultKeyValue != ""
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.CurrentUser
${endif}
${endif}
!else
ReadRegStr $MultiUser.DefaultKeyValue HKCU "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY}" "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME}"
${if} $MultiUser.DefaultKeyValue == ""
ReadRegStr $MultiUser.DefaultKeyValue HKLM "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY}" "${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME}"
${if} $MultiUser.DefaultKeyValue != ""
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
${endif}
${endif}
!endif
!endif
${else}
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.CurrentUser
${endif}
!else
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.CurrentUser
!endif
!ifdef MULTIUSER_INSTALLMODE_COMMANDLINE
;Check for install mode setting on command line
${${UNINSTALLER_FUNCPREFIX}GetParameters} $MultiUser.Parameters
${${UNINSTALLER_PREFIX}StrStr} $MultiUser.Result $MultiUser.Parameters "/CurrentUser"
${if} $MultiUser.Result != ""
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.CurrentUser
${endif}
${${UNINSTALLER_PREFIX}StrStr} $MultiUser.Result $MultiUser.Parameters "/AllUsers"
${if} $MultiUser.Result != ""
${if} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
${else}
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE}"
!insertmacro MULTIUSER_INIT_QUIT "${UNINSTALLER_FUNCPREFIX}"
${endif}
${endif}
!endif
!if ${MULTIUSER_MINWIN} < 0x500
${else}
;Not running Windows NT, per-user installation not supported
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
${endif}
!endif
!macroend
!macro MULTIUSER_INIT
!verbose push 3
!ifdef __UNINSTALL__
!insertmacro MULTIUSER_UNINIT
!else
!insertmacro MULTIUSER_INIT_CHECKS "" ""
!endif
!verbose pop
!macroend
!ifndef MULTIUSER_NOUNINSTALL
!macro MULTIUSER_UNINIT
!verbose push 3
!insertmacro MULTIUSER_INIT_CHECKS Un un.
!verbose pop
!macroend
!endif
/*
Mode selection page
*/
!macro MULTIUSER_PAGE_FUNCTION_CUSTOM TYPE
!ifmacrodef MUI_PAGE_FUNCTION_CUSTOM
!insertmacro MUI_PAGE_FUNCTION_CUSTOM "${TYPE}"
!endif
!ifdef MULTIUSER_PAGE_CUSTOMFUNCTION_${TYPE}
Call "${MULTIUSER_PAGE_CUSTOMFUNCTION_${TYPE}}"
!undef MULTIUSER_PAGE_CUSTOMFUNCTION_${TYPE}
!endif
!macroend
!macro MULTIUSER_INSTALLMODEPAGE_INTERFACE
!ifndef MULTIUSER_INSTALLMODEPAGE_INTERFACE
!define MULTIUSER_INSTALLMODEPAGE_INTERFACE
Var MultiUser.InstallModePage
Var MultiUser.InstallModePage.Text
Var MultiUser.InstallModePage.AllUsers
Var MultiUser.InstallModePage.CurrentUser
!endif
!macroend
!macro MULTIUSER_PAGEDECLARATION_INSTALLMODE UNPREFIX UNIQUEID
!define /ReDef MULTIUSER_${UNPREFIX}INSTALLMODEPAGE "" ; Unlock strings in the language file(s)
!insertmacro MULTIUSER_INSTALLMODEPAGE_INTERFACE
!define /IfNDef MULTIUSER_INSTALLMODEPAGE_TEXT_TOP "$(MULTIUSER_INNERTEXT_INSTALLMODE_TOP)"
!define /IfNDef MULTIUSER_INSTALLMODEPAGE_TEXT_ALLUSERS "$(MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS)"
!define /IfNDef MULTIUSER_INSTALLMODEPAGE_TEXT_CURRENTUSER "$(MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER)"
PageEx custom
PageCallbacks MultiUser.InstallModePre_${UNIQUEID} MultiUser.InstallModeLeave_${UNIQUEID}
!define /IfNDef MULTIUSER_INSTALLMODEPAGE_CAPTION " "
Caption "${MULTIUSER_INSTALLMODEPAGE_CAPTION}"
PageExEnd
!insertmacro MULTIUSER_FUNCTION_INSTALLMODEPAGE MultiUser.InstallModePre_${UNIQUEID} MultiUser.InstallModeLeave_${UNIQUEID}
!undef MULTIUSER_INSTALLMODEPAGE_TEXT_TOP
!undef MULTIUSER_INSTALLMODEPAGE_TEXT_ALLUSERS
!undef MULTIUSER_INSTALLMODEPAGE_TEXT_CURRENTUSER
!macroend
!macro MULTIUSER_PAGE_INSTALLMODE
!verbose push 3
!ifndef MULTIUSER_EXECUTIONLEVEL_ALLUSERS
!error "A mixed-mode installation requires MULTIUSER_EXECUTIONLEVEL to be set to Admin, Power or Highest."
!endif
!ifmacrodef MUI_PAGE_INIT
!insertmacro MUI_PAGE_INIT
!endif
!insertmacro MULTIUSER_PAGEDECLARATION_INSTALLMODE "" ${__COUNTER__}
!verbose pop
!macroend
!macro MULTIUSER_FUNCTION_INSTALLMODEPAGE PRE LEAVE
!include nsDialogs.nsh
Function "${PRE}"
!if ${MULTIUSER_MINWIN} < 0x500
${ifnot} ${IsNT}
Abort
${endif}
!endif
${if} $MultiUser.Privileges != "Power"
${andif} $MultiUser.Privileges != "Admin"
Abort
${endif}
!insertmacro MULTIUSER_PAGE_FUNCTION_CUSTOM PRE
!ifmacrodef MUI_HEADER_TEXT_PAGE
!insertmacro MUI_HEADER_TEXT_PAGE $(MULTIUSER_TEXT_INSTALLMODE_TITLE) $(MULTIUSER_TEXT_INSTALLMODE_SUBTITLE)
!endif
nsDialogs::Create 1018
Pop $MultiUser.InstallModePage
${NSD_CreateLabel} 0 2u 100% 42u "${MULTIUSER_INSTALLMODEPAGE_TEXT_TOP}"
Pop $MultiUser.InstallModePage.Text
${NSD_CreateRadioButton} 15u 50u -15u 10u "${MULTIUSER_INSTALLMODEPAGE_TEXT_ALLUSERS}"
Pop $MultiUser.InstallModePage.AllUsers
!ifdef MULTIUSER_INSTALLMODEPAGE_SHOWUSERNAME
!ifdef NOSYSTEMCALLS
ReadEnvStr $0 USERNAME
!else
System::Call 'ADVAPI32::GetUserName(t""r0,*i${NSIS_MAX_STRLEN})'
!endif
StrCmp $0 "" +2
StrCpy $0 " ($0)"
${NSD_CreateRadioButton} 15u 70u -15u 10u "${MULTIUSER_INSTALLMODEPAGE_TEXT_CURRENTUSER}$0"
!else
${NSD_CreateRadioButton} 15u 70u -15u 10u "${MULTIUSER_INSTALLMODEPAGE_TEXT_CURRENTUSER}"
!endif
Pop $MultiUser.InstallModePage.CurrentUser
${if} $MultiUser.InstallMode == "AllUsers"
SendMessage $MultiUser.InstallModePage.AllUsers ${BM_SETCHECK} ${BST_CHECKED} 0
${else}
SendMessage $MultiUser.InstallModePage.CurrentUser ${BM_SETCHECK} ${BST_CHECKED} 0
${endif}
!insertmacro MULTIUSER_PAGE_FUNCTION_CUSTOM SHOW
nsDialogs::Show
!insertmacro MULTIUSER_PAGE_FUNCTION_CUSTOM DESTROYED
FunctionEnd
Function "${LEAVE}"
SendMessage $MultiUser.InstallModePage.AllUsers ${BM_GETCHECK} 0 0 $0
${if} $0 = ${BST_CHECKED}
Call MultiUser.InstallMode.AllUsers
${else}
Call MultiUser.InstallMode.CurrentUser
${endif}
!insertmacro MULTIUSER_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend
!verbose pop
!endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,207 +0,0 @@
/*
NOTE:
-----
This macro is provided for backwards compatibility with NSIS 2.0 scripts.
It's recommended you update your scripts to use the new Library.nsh macros.
Macro - Upgrade DLL File
Written by Joost Verburg
------------------------
Parameters:
LOCALFILE Location of the new DLL file (on the compiler system)
DESTFILE Location of the DLL file that should be upgraded (on the user's system)
TEMPBASEDIR Directory on the user's system to store a temporary file when the system has
to be rebooted.
For Win9x/ME support, this should be on the same volume as DESTFILE.
The Windows temp directory could be located on any volume, so you cannot use
this directory.
Define UPGRADEDLL_NOREGISTER if you want to upgrade a DLL that does not have to be registered.
Notes:
* If you want to support Windows 9x/ME, you can only use short filenames (8.3).
* This macro uses the GetDLLVersionLocal command to retrieve the version of local libraries.
This command is only supported when compiling on a Windows system.
------------------------
Example:
!insertmacro UpgradeDLL "dllname.dll" "$SYSDIR\dllname.dll" "$SYSDIR"
*/
!ifndef UPGRADEDLL_INCLUDED
!define UPGRADEDLL_INCLUDED
!macro __UpgradeDLL_Helper_AddRegToolEntry mode filename tempdir
Push $R0
Push $R1
Push $R2
Push $R3
;------------------------
;Copy the parameters
Push "${filename}"
Push "${tempdir}"
Pop $R2 ; temporary directory
Pop $R1 ; file name to register
;------------------------
;Advance counter
StrCpy $R0 0
ReadRegDWORD $R0 HKLM "Software\NSIS.Library.RegTool.v3\UpgradeDLLSession" "count"
IntOp $R0 $R0 + 1
WriteRegDWORD HKLM "Software\NSIS.Library.RegTool.v3\UpgradeDLLSession" "count" "$R0"
;------------------------
;Setup RegTool
!if ! /FileExists "${NSISDIR}\Bin\RegTool-${NSIS_CPU}.bin"
!error "Missing RegTool for ${NSIS_CPU}!"
!endif
ReadRegStr $R3 HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "NSIS.Library.RegTool.v3"
StrCpy $R3 $R3 -4 1
IfFileExists $R3 +3
File /oname=$R2\NSIS.Library.RegTool.v3.$HWNDPARENT.exe "${NSISDIR}\Bin\RegTool-${NSIS_CPU}.bin"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
"NSIS.Library.RegTool.v3" '"$R2\NSIS.Library.RegTool.v3.$HWNDPARENT.exe" /S'
;------------------------
;Add RegTool entry
WriteRegStr HKLM "Software\NSIS.Library.RegTool.v3\UpgradeDLLSession" "$R0.file" "$R1"
WriteRegStr HKLM "Software\NSIS.Library.RegTool.v3\UpgradeDLLSession" "$R0.mode" "${mode}"
Pop $R3
Pop $R2
Pop $R1
Pop $R0
!macroend
!macro UpgradeDLL LOCALFILE DESTFILE TEMPBASEDIR
Push $R0
Push $R1
Push $R2
Push $R3
Push $R4
Push $R5
!define UPGRADEDLL_UNIQUE "${__FILE__}${__LINE__}"
SetOverwrite try
;------------------------
;Copy the macro parameters to a run-time to a variable,
;this allows the usage of variables as parameter
StrCpy $R4 "${DESTFILE}"
StrCpy $R5 "${TEMPBASEDIR}"
;------------------------
;Get version information
IfFileExists $R4 0 "upgradedll.copy_${UPGRADEDLL_UNIQUE}"
ClearErrors
GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
GetDLLVersion $R4 $R2 $R3
IfErrors "upgradedll.upgrade_${UPGRADEDLL_UNIQUE}"
IntCmpU $R0 $R2 0 "upgradedll.done_${UPGRADEDLL_UNIQUE}" "upgradedll.upgrade_${UPGRADEDLL_UNIQUE}"
IntCmpU $R1 $R3 "upgradedll.done_${UPGRADEDLL_UNIQUE}" "upgradedll.done_${UPGRADEDLL_UNIQUE}" \
"upgradedll.upgrade_${UPGRADEDLL_UNIQUE}"
;------------------------
;Upgrade
"upgradedll.upgrade_${UPGRADEDLL_UNIQUE}:"
!ifndef UPGRADEDLL_NOREGISTER
;Unregister the DLL
UnRegDLL $R4
!endif
;------------------------
;Copy
ClearErrors
StrCpy $R0 $R4
Call ":upgradedll.file_${UPGRADEDLL_UNIQUE}"
IfErrors 0 "upgradedll.noreboot_${UPGRADEDLL_UNIQUE}"
;------------------------
;Copy on reboot
GetTempFileName $R0 $R5
Call ":upgradedll.file_${UPGRADEDLL_UNIQUE}"
Rename /REBOOTOK $R0 $R4
;------------------------
;Register on reboot
!insertmacro __UpgradeDLL_Helper_AddRegToolEntry 'D' $R4 $R5
Goto "upgradedll.done_${UPGRADEDLL_UNIQUE}"
;------------------------
;DLL does not exist
"upgradedll.copy_${UPGRADEDLL_UNIQUE}:"
StrCpy $R0 $R4
Call ":upgradedll.file_${UPGRADEDLL_UNIQUE}"
;------------------------
;Register
"upgradedll.noreboot_${UPGRADEDLL_UNIQUE}:"
!ifndef UPGRADEDLL_NOREGISTER
RegDLL $R4
!endif
;------------------------
;Done
"upgradedll.done_${UPGRADEDLL_UNIQUE}:"
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Pop $R1
Pop $R0
;------------------------
;End
Goto "upgradedll.end_${UPGRADEDLL_UNIQUE}"
;------------------------
;Extract
"upgradedll.file_${UPGRADEDLL_UNIQUE}:"
File /oname=$R0 "${LOCALFILE}"
Return
"upgradedll.end_${UPGRADEDLL_UNIQUE}:"
SetOverwrite lastused
!undef UPGRADEDLL_UNIQUE
!macroend
!endif

View File

@ -1,90 +0,0 @@
/*
VB6RunTime.nsh
Setup of Visual Basic 6.0 run-time files, including the Oleaut32.dll security update
Copyright 2008-2023 Joost Verburg
To obtain the run-time files, download and extract
https://nsis.sourceforge.io/vb6runtime.zip
Script code for installation:
!insertmacro InstallVB6RunTime FOLDER ALREADY_INSTALLED
in which FOLDER is the location of the run-time files and ALREADY_INSTALLED is the
name of a variable that is empty when the application is installed for the first time
and non-empty otherwise
Script code for uninstallation:
!insertmacro UnInstallVB6RunTime
Remarks:
* You may have to install additional files for such Visual Basic application to work,
such as OCX files for user interface controls.
* Installation of the run-time files requires Administrator or Power User privileges.
Use the Multi-User header file to verify whether these privileges are available.
* Add a Modern UI finish page or another check (see IfRebootFlag in the NSIS Users
Manual) to allow the user to restart the computer when necessary.
*/
!ifndef VB6_INCLUDED
!define VB6_INCLUDED
!verbose push
!verbose 3
!include Library.nsh
!include WinVer.nsh
!macro VB6RunTimeInstall FOLDER ALREADY_INSTALLED
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"
;The files below will only be installed on Win9x/NT4
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR"
!insertmacro InstallLib DLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR"
!insertmacro InstallLib TLB "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR"
Push $R0
${if} ${IsNT}
${if} ${IsWinNT4}
ReadRegStr $R0 HKLM "System\CurrentControlSet\Control" "ProductOptions"
${if} $R0 == "Terminal Server"
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4TS\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
${else}
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
${endif}
${endif}
${else}
;No Oleaut32.dll with the security update has been released for Windows 9x.
;The NT4 version is used because NT4 and Win9x used to share the same 2.40 version
;and version 2.40.4519.0 is reported to work fine on Win9x.
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
${endif}
Pop $R0
!macroend
!macro VB6RunTimeUnInstall
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\msvbvm60.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\oleaut32.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\olepro32.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\comcat.dll"
!insertmacro UnInstallLib DLL SHARED NOREMOVE "$SYSDIR\asycfilt.dll"
!insertmacro UnInstallLib TLB SHARED NOREMOVE "$SYSDIR\stdole2.tlb"
!macroend
!verbose pop
!endif

View File

@ -1,47 +0,0 @@
; PatchLib v3.0
; =============
;
; Library with macro for use with VPatch (DLL version) in NSIS 2.0.5+
; Created by Koen van de Sande
!include LogicLib.nsh
!macro VPatchFile PATCHDATA SOURCEFILE TEMPFILE
Push $1
Push $2
Push $3
Push $4
Push ${SOURCEFILE}
Push ${TEMPFILE}
Pop $2 # temp file
Pop $3 # source file
InitPluginsDir
GetTempFileName $1 $PLUGINSDIR
File /oname=$1 ${PATCHDATA}
vpatch::vpatchfile $1 $3 $2
Pop $4
DetailPrint $4
StrCpy $4 $4 2
${Unless} $4 == "OK"
SetErrors
${EndIf}
${If} ${FileExists} $2
Delete $3
Rename /REBOOTOK $2 $3
${EndIf}
Delete $1
Pop $4
Pop $3
Pop $2
Pop $1
!macroend

View File

@ -1,392 +0,0 @@
/*
-------------
COM.nsh
-------------
COM defines and helper macros
; Example usage:
!include LogicLib.nsh
!include Win\COM.nsh
!include Win\Propkey.nsh
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_ShellLink} ${IID_IShellLink} r0 ""
${If} $0 P<> 0
${IShellLink::SetPath} $0 '("%COMSPEC%").r1'
${IShellLink::SetArguments} $0 '("/k echo HelloWorld").r2'
${If} $1 = 0
${AndIf} $2 = 0
${IUnknown::QueryInterface} $0 '("${IID_IPropertyStore}",.r1)'
${If} $1 P<> 0
System::Call '*${SYSSTRUCT_PROPERTYKEY}(${PKEY_AppUserModel_StartPinOption})p.r2'
System::Call '*${SYSSTRUCT_PROPVARIANT}(${VT_UI4},,&i4 ${APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL})p.r3'
${IPropertyStore::SetValue} $1 '($2,$3)'
; Reuse the PROPERTYKEY & PROPVARIANT buffers to set another property
System::Call '*$2${SYSSTRUCT_PROPERTYKEY}(${PKEY_AppUserModel_ExcludeFromShowInNewInstall})'
System::Call '*$3${SYSSTRUCT_PROPVARIANT}(${VT_BOOL},,&i2 ${VARIANT_TRUE})'
${IPropertyStore::SetValue} $1 '($2,$3)'
System::Free $2
System::Free $3
${IPropertyStore::Commit} $1 ""
${IUnknown::Release} $1 ""
${EndIf}
${IUnknown::QueryInterface} $0 '("${IID_IPersistFile}",.r1)'
${If} $1 P<> 0
${IPersistFile::Save} $1 '("$SMPrograms\nsis_test.lnk",1)'
${IUnknown::Release} $1 ""
${EndIf}
${EndIf}
${IUnknown::Release} $0 ""
${EndIf}
*/
!ifndef __WIN_COM__INC
!define __WIN_COM__INC ${NSIS_CHAR_SIZE}
!verbose push
!verbose 3
!define /ifndef STGM_READ 0
!define /ifndef STGM_WRITE 1
!define /ifndef STGM_READWRITE 2
!define /ifndef STGM_SHARE_DENY_NONE 0x00000040
!define /ifndef STGM_SHARE_DENY_READ 0x00000030
!define /ifndef STGM_SHARE_DENY_WRITE 0x00000020
!define /ifndef STGM_SHARE_EXCLUSIVE 0x00000010
!define /ifndef STGM_PRIORITY 0x00040000
!define /ifndef STGM_CREATE 0x00001000
!define /ifndef STGM_CONVERT 0x00020000
!define /ifndef STGM_FAILIFTHERE 0
!define /ifndef STGM_DELETEONRELEASE 0x04000000
!define /ifndef CLSCTX_INPROC_SERVER 0x1
!define /ifndef CLSCTX_INPROC_HANDLER 0x2
!define /ifndef CLSCTX_LOCAL_SERVER 0x4
!define /ifndef CLSCTX_REMOTE_SERVER 0x10
!define /ifndef CLSCTX_ACTIVATE_32_BIT_SERVER 0x40000
!define /ifndef CLSCTX_ACTIVATE_64_BIT_SERVER 0x80000
!define /ifndef CLSCTX_ENABLE_CLOAKING 0x100000
!define NSISCOMCALL "!insertmacro NSISCOMCALL "
!macro NSISCOMCALL vtblidx decl ptr params
!if ${NSIS_CHAR_SIZE} <> ${__WIN_COM__INC}
; Warn if QueryInterface() for IID_IShellLink etc will return the wrong interface
!warning "NSIS_CHAR_SIZE changed, existing defines and macros might not work correctly!"
!endif
System::Call `${ptr}->${vtblidx}${decl}${params}`
!macroend
!define NSISCOMIFACEDECL "!insertmacro NSISCOMIFACEDECL "
!macro NSISCOMIFACEDECL iface method vtblidx decl
!define ${iface}::${method} `${NSISCOMCALL} ${vtblidx} ${decl} `
!macroend
!macro ComHlpr_CreateInstance clsid iid sysoutvarIFacePtr sysret
System::Call 'OLE32::CoCreateInstance(g"${clsid}",i0,i23,g"${iid}",*p.${sysoutvarIFacePtr})i${sysret}'
!macroend
!macro ComHlpr_CreateInProcInstance clsid iid sysoutvarIFacePtr sysret
System::Call 'OLE32::CoCreateInstance(g"${clsid}",i0,i${CLSCTX_INPROC_SERVER},g"${iid}",*p.${sysoutvarIFacePtr})i${sysret}'
!macroend
!macro ComHlpr_SafeRelease _p
${If} ${_p} P<> 0
${IUnknown::Release} ${_p} ""
${EndIf}
!macroend
!macro ComHlpr_SafeReleaseAndNull _p
${If} ${_p} P<> 0
${IUnknown::Release} ${_p} ""
StrCpy ${_p} 0
${EndIf}
!macroend
!ifndef IID_IUnknown
!define IID_IUnknown {00000000-0000-0000-C000-000000000046}
${NSISCOMIFACEDECL}IUnknown QueryInterface 0 (g,*p)i
${NSISCOMIFACEDECL}IUnknown AddRef 1 ()i
${NSISCOMIFACEDECL}IUnknown Release 2 ()i
!endif
!ifndef IID_IPersist
!define IID_IPersist {0000010c-0000-0000-C000-000000000046}
${NSISCOMIFACEDECL}IPersist GetClassID 3 (g)i
!endif
!ifndef IID_IPersistStream
!define IID_IPersistStream {00000109-0000-0000-C000-000000000046} ; IPersist>
${NSISCOMIFACEDECL}IPersistStream IsDirty 4 ()i
${NSISCOMIFACEDECL}IPersistStream Load 5 (p,i)i
${NSISCOMIFACEDECL}IPersistStream Save 6 (p,i)i
${NSISCOMIFACEDECL}IPersistStream GetSizeMax 7 (*l)i
!endif
!ifndef IID_IPersistStreamInit
!define IID_IPersistStreamInit {7FD52380-4E07-101B-AE2D-08002B2EC713} ; IPersist>
${NSISCOMIFACEDECL}IPersistStreamInit IsDirty 4 ()i
${NSISCOMIFACEDECL}IPersistStreamInit Load 5 (p,i)i
${NSISCOMIFACEDECL}IPersistStreamInit Save 6 (p,i)i
${NSISCOMIFACEDECL}IPersistStreamInit GetSizeMax 7 (*l)i
${NSISCOMIFACEDECL}IPersistStreamInit InitNew 8 ()i
!endif
!ifndef IID_IPersistFile
!define IID_IPersistFile {0000010b-0000-0000-C000-000000000046} ; IPersist>
${NSISCOMIFACEDECL}IPersistFile IsDirty 4 ()i
${NSISCOMIFACEDECL}IPersistFile Load 5 (w,i)i
${NSISCOMIFACEDECL}IPersistFile Save 6 (w,i)i
${NSISCOMIFACEDECL}IPersistFile SaveCompleted 7 (w)i
${NSISCOMIFACEDECL}IPersistFile GetCurFile 8 (*w)i
!endif
!ifndef CLSID_ShellLink
!define CLSID_ShellLink {00021401-0000-0000-c000-000000000046}
!endif
!ifndef IID_IShellLink
!define IID_IShellLinkA {000214ee-0000-0000-c000-000000000046}
!define IID_IShellLinkW {000214f9-0000-0000-c000-000000000046}
!ifdef NSIS_UNICODE
!define IID_IShellLink ${IID_IShellLinkW}
!else
!define IID_IShellLink ${IID_IShellLinkA}
!endif
${NSISCOMIFACEDECL}IShellLink GetPath 3 (t,i,p,i)i
${NSISCOMIFACEDECL}IShellLink GetIDList 4 (*p)i
${NSISCOMIFACEDECL}IShellLink SetIDList 5 (p)i
${NSISCOMIFACEDECL}IShellLink GetDescription 6 (t,i)i
${NSISCOMIFACEDECL}IShellLink SetDescription 7 (t)i
${NSISCOMIFACEDECL}IShellLink GetWorkingDirectory 8 (t,i)i
${NSISCOMIFACEDECL}IShellLink SetWorkingDirectory 9 (t)i
${NSISCOMIFACEDECL}IShellLink GetArguments 10 (t,i)i
${NSISCOMIFACEDECL}IShellLink SetArguments 11 (t)i
${NSISCOMIFACEDECL}IShellLink GetHotkey 12 (*i0)i
${NSISCOMIFACEDECL}IShellLink SetHotkey 13 (&i2)i
${NSISCOMIFACEDECL}IShellLink GetShowCmd 14 (*i)i
${NSISCOMIFACEDECL}IShellLink SetShowCmd 15 (i)i
${NSISCOMIFACEDECL}IShellLink GetIconLocation 16 (t,i,*i)i
${NSISCOMIFACEDECL}IShellLink SetIconLocation 17 (t,i)i
${NSISCOMIFACEDECL}IShellLink SetRelativePath 18 (t,i)i
${NSISCOMIFACEDECL}IShellLink Resolve 19 (p,i)i
${NSISCOMIFACEDECL}IShellLink SetPath 20 (t)i
!endif
!ifndef IID_IShellLinkDataList
!define IID_IShellLinkDataList {45e2b4ae-b1c3-11d0-b92f-00a0c90312e1}
${NSISCOMIFACEDECL}IShellLinkDataList AddDataBlock 3 (p)i
${NSISCOMIFACEDECL}IShellLinkDataList CopyDataBlock 4 (i,*p)i
${NSISCOMIFACEDECL}IShellLinkDataList RemoveDataBlock 5 (i)i
${NSISCOMIFACEDECL}IShellLinkDataList GetFlags 6 (*i)i
${NSISCOMIFACEDECL}IShellLinkDataList SetFlags 7 (i)i
!endif
!define /ifndef EXP_SZ_LINK_SIG 0xA0000001
!define /ifndef NT_CONSOLE_PROPS_SIG 0xA0000002
!define /ifndef NT_FE_CONSOLE_PROPS_SIG 0xA0000004
!define /ifndef EXP_SPECIAL_FOLDER_SIG 0xA0000005
!define /ifndef EXP_DARWIN_ID_SIG 0xA0000006
!define /ifndef EXP_SZ_ICON_SIG 0xA0000007
!define /ifndef EXP_PROPERTYSTORAGE_SIG 0xA0000009
;SHELL_LINK_DATA_FLAGS
!define /ifndef SLDF_HAS_ID_LIST 0x00000001
!define /ifndef SLDF_HAS_LINK_INFO 0x00000002
!define /ifndef SLDF_HAS_NAME 0x00000004
!define /ifndef SLDF_HAS_RELPATH 0x00000008
!define /ifndef SLDF_HAS_WORKINGDIR 0x00000010
!define /ifndef SLDF_HAS_ARGS 0x00000020
!define /ifndef SLDF_HAS_ICONLOCATION 0x00000040
!define /ifndef SLDF_UNICODE 0x00000080
!define /ifndef SLDF_FORCE_NO_LINKINFO 0x00000100
!define /ifndef SLDF_HAS_EXP_SZ 0x00000200
!define /ifndef SLDF_RUN_IN_SEPARATE 0x00000400
!define /ifndef SLDF_HAS_LOGO3ID 0x00000800
!define /ifndef SLDF_HAS_DARWINID 0x00001000
!define /ifndef SLDF_RUNAS_USER 0x00002000
!define /ifndef SLDF_HAS_EXP_ICON_SZ 0x00004000
!define /ifndef SLDF_NO_PIDL_ALIAS 0x00008000
!define /ifndef SLDF_FORCE_UNCNAME 0x00010000
!define /ifndef SLDF_RUN_WITH_SHIMLAYER 0x00020000
!define /ifndef SLDF_FORCE_NO_LINKTRACK 0x00040000 ;[Vista+]
!define /ifndef SLDF_ENABLE_TARGET_METADATA 0x00080000
!define /ifndef SLDF_DISABLE_LINK_PATH_TRACKING 0x00100000 ;[Seven+]
!define /ifndef SLDF_DISABLE_KNOWNFOLDER_RELATIVE_TRACKING 0x00200000
!define /ifndef SLDF_NO_KF_ALIAS 0x00400000
!define /ifndef SLDF_ALLOW_LINK_TO_LINK 0x00800000
!define /ifndef SLDF_UNALIAS_ON_SAVE 0x01000000
!define /ifndef SLDF_PREFER_ENVIRONMENT_PATH 0x02000000
!define /ifndef SLDF_KEEP_LOCAL_IDLIST_FOR_UNC_TARGET 0x04000000
!define /ifndef SLDF_PERSIST_VOLUME_ID_RELATIVE 0x08000000 ;[Eight+]
!ifndef IID_IShellItem
!define IID_IShellItem {43826d1e-e718-42ee-bc55-a1e261c37bfe}
${NSISCOMIFACEDECL}IShellItem BindToHandler 3 (p,g,g,*p)i
${NSISCOMIFACEDECL}IShellItem GetParent 4 (*p)i
${NSISCOMIFACEDECL}IShellItem GetDisplayName 5 (i,*p)i
${NSISCOMIFACEDECL}IShellItem GetAttributes 6 (i,*i)i
${NSISCOMIFACEDECL}IShellItem Compare 7 (p,i,*i)i
!endif
!ifndef CLSID_StartMenuPin
!define CLSID_StartMenuPin {a2a9545d-a0c2-42b4-9708-a0b2badd77c8}
!endif
!ifndef IID_IStartMenuPinnedList
!define IID_IStartMenuPinnedList {4CD19ADA-25A5-4A32-B3B7-347BEE5BE36B}
${NSISCOMIFACEDECL}IStartMenuPinnedList RemoveFromList 3 (p)i
!endif
!ifndef CLSID_ApplicationDestinations
!define CLSID_ApplicationDestinations {86c14003-4d6b-4ef3-a7b4-0506663b2e68}
!endif
!ifndef IID_IApplicationDestinations
!define IID_IApplicationDestinations {12337D35-94C6-48A0-BCE7-6A9C69D4D600} ;[Seven+]
${NSISCOMIFACEDECL}IApplicationDestinations SetAppID 3 (w)i
${NSISCOMIFACEDECL}IApplicationDestinations RemoveDestination 4 (p)i ; IShellItem or IShellLink
${NSISCOMIFACEDECL}IApplicationDestinations RemoveAllDestinations 5 ()i
!endif
!ifndef CLSID_DestinationList
!define CLSID_DestinationList {77f10cf0-3db5-4966-b520-b7c54fd35ed6}
!endif
!ifndef IID_ICustomDestinationList
!define IID_ICustomDestinationList {6332debf-87b5-4670-90c0-5e57b408a49e} ;[Seven+]
${NSISCOMIFACEDECL}ICustomDestinationList SetAppID 3 (w)i
${NSISCOMIFACEDECL}ICustomDestinationList BeginList 4 (*i,g,*p)i ; IObjectArray or IEnumObjects
${NSISCOMIFACEDECL}ICustomDestinationList AppendCategory 5 (w,p)i ; IObjectArray*
${NSISCOMIFACEDECL}ICustomDestinationList AppendKnownCategory 6 (i)i
${NSISCOMIFACEDECL}ICustomDestinationList AddUserTasks 7 (p)i ; IObjectArray*
${NSISCOMIFACEDECL}ICustomDestinationList CommitList 8 ()i
${NSISCOMIFACEDECL}ICustomDestinationList GetRemovedDestinations 9 (g,*p)i ; IObjectCollection
${NSISCOMIFACEDECL}ICustomDestinationList DeleteList 10 (w)i
${NSISCOMIFACEDECL}ICustomDestinationList AbortList 11 ()i
!endif
!ifndef CLSID_EnumerableObjectCollection
!define CLSID_EnumerableObjectCollection {2d3468c1-36a7-43b6-ac24-d3f02fd9607a}
!endif
!ifndef IID_IObjectArray
!define IID_IObjectArray {92CA9DCD-5622-4bba-A805-5E9F541BD8C9}
${NSISCOMIFACEDECL}IObjectArray GetCount 3 (*i)i
${NSISCOMIFACEDECL}IObjectArray GetAt 4 (i,g,*p)i
!endif
!ifndef IID_IObjectCollection
!define IID_IObjectCollection {5632b1a4-e38a-400a-928a-d4cd63230295} ; IObjectArray>
${NSISCOMIFACEDECL}IObjectCollection AddObject 5 (p)i ; IUnknown*
${NSISCOMIFACEDECL}IObjectCollection AddFromArray 6 (p)i ; IObjectArray*
${NSISCOMIFACEDECL}IObjectCollection RemoveObjectAt 7 (i)i
${NSISCOMIFACEDECL}IObjectCollection Clear 8 ()i
!endif
!ifndef IID_IEnumObjects
!define IID_IEnumObjects {2c1c7e2e-2d0e-4059-831e-1e6f82335c2e}
${NSISCOMIFACEDECL}IEnumObjects Next 3 (i,g,*p,*i)i
${NSISCOMIFACEDECL}IEnumObjects Skip 4 (i)i
${NSISCOMIFACEDECL}IEnumObjects Reset 5 ()i
${NSISCOMIFACEDECL}IEnumObjects Clone 6 (*p)i
!endif
!ifndef IID_IEnumUnknown
!define IID_IEnumUnknown {00000100-0000-0000-C000-000000000046}
${NSISCOMIFACEDECL}IEnumUnknown Next 3 (i,*p,*i)i
${NSISCOMIFACEDECL}IEnumUnknown Skip 4 (i)i
${NSISCOMIFACEDECL}IEnumUnknown Reset 5 ()i
${NSISCOMIFACEDECL}IEnumUnknown Clone 6 (*p)i
!endif
!ifndef IID_IPropertyStore
!define IID_IPropertyStore {886D8EEB-8CF2-4446-8D02-CDBA1DBDCF99}
${NSISCOMIFACEDECL}IPropertyStore GetCount 3 (*i)i
${NSISCOMIFACEDECL}IPropertyStore GetAt 4 (i,p)i
${NSISCOMIFACEDECL}IPropertyStore GetValue 5 (p,p)i
${NSISCOMIFACEDECL}IPropertyStore SetValue 6 (p,p)i
${NSISCOMIFACEDECL}IPropertyStore Commit 7 ()i
!endif
!ifndef IID_IPropertyStorage
!define IID_IPropertyStorage {00000138-0000-0000-C000-000000000046}
${NSISCOMIFACEDECL}IPropertyStorage ReadMultiple 3 (i,p,p)i
${NSISCOMIFACEDECL}IPropertyStorage WriteMultiple 4 (i,p,p,i)i
${NSISCOMIFACEDECL}IPropertyStorage DeleteMultiple 5 (i,p)i
${NSISCOMIFACEDECL}IPropertyStorage ReadPropertyNames 6 (p,p)i
${NSISCOMIFACEDECL}IPropertyStorage WritePropertyNames 7 (i,p,p)i
${NSISCOMIFACEDECL}IPropertyStorage DeletePropertyNames 8 (i,p)i
${NSISCOMIFACEDECL}IPropertyStorage Commit 9 (i)i ; Note: Some implementations might return E_NOTIMPL
${NSISCOMIFACEDECL}IPropertyStorage Revert 10 ()i
${NSISCOMIFACEDECL}IPropertyStorage Enum 11 (*p)i
${NSISCOMIFACEDECL}IPropertyStorage SetTimes 12 (p,p,p)i
${NSISCOMIFACEDECL}IPropertyStorage SetClass 13 (g)i
${NSISCOMIFACEDECL}IPropertyStorage Stat 14 (p)i
!endif
!ifndef IID_IPropertySetStorage
!define IID_IPropertySetStorage {0000013A-0000-0000-C000-000000000046}
${NSISCOMIFACEDECL}IPropertySetStorage Create 3 (g,g,i,i,*p)i
${NSISCOMIFACEDECL}IPropertySetStorage Open 4 (g,i,*p)i
${NSISCOMIFACEDECL}IPropertySetStorage Delete 5 (g)i
${NSISCOMIFACEDECL}IPropertySetStorage Enum 6 (*p)i
!endif
!ifndef CLSID_ApplicationAssociationRegistration
!define CLSID_ApplicationAssociationRegistration {591209c7-767b-42b2-9fba-44ee4615f2c7}
!endif
!ifndef IID_IApplicationAssociationRegistration
!define IID_IApplicationAssociationRegistration {4e530b0a-e611-4c77-a3ac-9031d022281b} ;[Vista+]
${NSISCOMIFACEDECL}IApplicationAssociationRegistration QueryCurrentDefault 3 (w,i,i,*p)i
${NSISCOMIFACEDECL}IApplicationAssociationRegistration QueryAppIsDefault 4 (w,i,i,w,*i)i
${NSISCOMIFACEDECL}IApplicationAssociationRegistration QueryAppIsDefaultAll 5 (i,w,*i)i
${NSISCOMIFACEDECL}IApplicationAssociationRegistration SetAppAsDefault 6 (w,w,i)i
${NSISCOMIFACEDECL}IApplicationAssociationRegistration SetAppAsDefaultAll 7 (w)i
${NSISCOMIFACEDECL}IApplicationAssociationRegistration ClearUserAssociations 8 ()i
!endif
!ifndef CLSID_ApplicationAssociationRegistrationUI
!define CLSID_ApplicationAssociationRegistrationUI {1968106d-f3b5-44cf-890e-116fcb9ecef1}
!endif
!ifndef IID_IApplicationAssociationRegistrationUI
!define IID_IApplicationAssociationRegistrationUI {1f76a169-f994-40ac-8fc8-0959e8874710} ;[Vista+]
${NSISCOMIFACEDECL}IApplicationAssociationRegistrationUI LaunchAdvancedAssociationUI 3 (w)i
!endif
!ifndef CLSID_GameExplorer
!define CLSID_GameExplorer {9A5EA990-3034-4D6F-9128-01F3C61022BC}
!endif
!ifndef IID_IGameExplorer
!define IID_IGameExplorer {E7B2FB72-D728-49B3-A5F2-18EBF5F1349E} ;[Vista+]
${NSISCOMIFACEDECL}IGameExplorer AddGame 3 (p,p,i,g)i
${NSISCOMIFACEDECL}IGameExplorer RemoveGame 4 (i,i,i,i)i ; The parameter is a GUID, not REFGUID so the 'g' type cannot be used!
${NSISCOMIFACEDECL}IGameExplorer UpdateGame 5 (i,i,i,i)i
${NSISCOMIFACEDECL}IGameExplorer VerifyAccess 6 (p,*i)i
!endif
!define /ifndef GIS_NOT_INSTALLED 1
!define /ifndef GIS_CURRENT_USER 2
!define /ifndef GIS_ALL_USERS 3
!ifndef IID_IGameExplorer2
!define IID_IGameExplorer2 {86874AA7-A1ED-450d-A7EB-B89E20B2FFF3} ;[Seven+]
${NSISCOMIFACEDECL}IGameExplorer2 InstallGame 3 (w,w,i)i
${NSISCOMIFACEDECL}IGameExplorer2 UninstallGame 4 (w)i
${NSISCOMIFACEDECL}IGameExplorer2 CheckAccess 5 (w,*i)i
!endif
!ifndef CLSID_GameStatistics
!define CLSID_GameStatistics {DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4}
!endif
!ifndef IID_IGameStatisticsMgr
!define IID_IGameStatisticsMgr {AFF3EA11-E70E-407d-95DD-35E612C41CE2} ;[Seven+]
${NSISCOMIFACEDECL}IGameStatisticsMgr GetGameStatistics 3 (w,i,*i,*p)i
${NSISCOMIFACEDECL}IGameStatisticsMgr RemoveGameStatistics 4 (w)i
!endif
!ifndef CLSID_InternetShortcut
!define CLSID_InternetShortcut {FBF23B40-E3F0-101B-8488-00AA003E56F8}
!endif
!ifndef IID_IUniformResourceLocator
!define IID_IUniformResourceLocatorA {FBF23B80-E3F0-101B-8488-00AA003E56F8}
!define IID_IUniformResourceLocatorW {CABB0DA0-DA57-11CF-9974-0020AFD79762}
!ifdef NSIS_UNICODE
!define IID_IUniformResourceLocator ${IID_IUniformResourceLocatorW}
!else
!define IID_IUniformResourceLocator ${IID_IUniformResourceLocatorA}
!endif
${NSISCOMIFACEDECL}IUniformResourceLocator SetURL 3 (t,i)i
${NSISCOMIFACEDECL}IUniformResourceLocator GetURL 4 (*p)i
${NSISCOMIFACEDECL}IUniformResourceLocator InvokeCommand 5 (p)i
!endif
!verbose pop
!endif /* __WIN_COM__INC */

View File

@ -1,216 +0,0 @@
!ifndef __WIN_PROPKEY__INC
!define __WIN_PROPKEY__INC
!verbose push
!verbose 3
/**************************************************
WTypes.h
**************************************************/
;NOTE: This list is incomplete
!define VT_EMPTY 0
!define VT_NULL 1
!define VT_I2 2
!define VT_I4 3
!define VT_BSTR 8
!define VT_BOOL 11
!define VT_I1 16
!define VT_UI1 17
!define VT_UI2 18
!define VT_UI4 19
!define VT_I8 20
!define VT_UI8 21
!define VT_INT 22
!define VT_UINT 23
!define VT_HRESULT 25
!define VT_PTR 26
!define VT_SAFEARRAY 27
!define VT_LPSTR 30 ; SHStrDupA
!define VT_LPWSTR 31 ; SHStrDupW
!define VT_FILETIME 64
!define VT_STREAM 66
!define VT_CLSID 72 ; Pointer to CoTaskMem allocated GUID
!define VT_TYPEMASK 0xFFF
!define VT_VECTOR 0x1000
!define VT_ARRAY 0x2000
!define VT_BYREF 0x4000
!define /ifndef VARIANT_TRUE -1
!define /ifndef VARIANT_FALSE 0
!define SYSSIZEOF_PROPERTYKEY 20
!define SYSSTRUCT_PROPERTYKEY (&g16,&i4) ;System.dll is buggy when it comes to g and forces us to specify the size
!define STGC_DEFAULT 0
!define STGC_OVERWRITE 1
!define STGC_ONLYIFCURRENT 2
!define STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE 4
!define STGC_CONSOLIDATE 8
/**************************************************
OAIdl.h
**************************************************/
!if "${NSIS_PTR_SIZE}" > 4
!define SYSSIZEOF_VARIANT 24
!define SYSSTRUCT_VARIANT (&i2,&i6,&i8,&i8)
!else
!define SYSSIZEOF_VARIANT 16
!define SYSSTRUCT_VARIANT (&i2,&i6,&i8)
!endif
/**************************************************
PropIdl.h
**************************************************/
!if "${NSIS_PTR_SIZE}" > 4
!define SYSSIZEOF_PROPVARIANT 24
!define SYSSTRUCT_PROPVARIANT (&i2,&i6,&i8,&i8)
!else
!define SYSSIZEOF_PROPVARIANT 16
!define SYSSTRUCT_PROPVARIANT (&i2,&i6,&i8)
!endif
!define PRSPEC_LPWSTR 0
!define PRSPEC_PROPID 1
!define SYSSTRUCT_PROPSPEC (p,p)
/**************************************************
Propkey.h
**************************************************/
!define PKEY_AppUserModel_RelaunchCommand '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",2' ; VT_LPWSTR (SHGetPropertyStoreForWindow)
!define PKEY_AppUserModel_RelaunchIconResource '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",3' ; VT_LPWSTR (SHGetPropertyStoreForWindow, optional. Path to icon or module, with resource ID or index.)
!define PKEY_AppUserModel_RelaunchDisplayNameResource '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",4' ; VT_LPWSTR (SHGetPropertyStoreForWindow. @ style indirect resource string or a plain string.)
!define PKEY_AppUserModel_ID '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",5' ; VT_LPWSTR
!define PKEY_AppUserModel_IsDestListSeparator '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",6' ; VT_BOOL
!define PKEY_AppUserModel_ExcludeFromShowInNewInstall '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",8' ; VT_BOOL
!define PKEY_AppUserModel_PreventPinning '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",9' ; VT_BOOL
!define PKEY_AppUserModel_IsDualMode '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",11' ; [Eight+] VT_BOOL
!define APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL 1
!define APPUSERMODEL_STARTPINOPTION_USERPINNED 2
!define PKEY_AppUserModel_StartPinOption '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",12' ; [Eight+] VT_UI4
!define PKEY_AppUserModel_ToastActivatorCLSID '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",26' ; [10FU1507+] VT_CLSID
!define PKEY_EdgeGesture_DisableTouchWhenFullscreen '"{32CE38B2-2C9A-41B1-9BC5-B3784394AA44}",2' ; [Eight+] VT_BOOL (SHGetPropertyStoreForWindow)
/**************************************************
ShlGuid.h & ShlObj.h
**************************************************/
!define FMTID_Intshcut {000214A0-0000-0000-C000-000000000046}
!define PID_IS_URL 2 ; VT_LPWSTR
!define PID_IS_HOTKEY 6 ; VT_UI2
!define PID_IS_ICONINDEX 8 ; VT_I4
!define PID_IS_ICONFILE 9 ; VT_LPWSTR
!define PKEY_Intshcut_Url '"${FMTID_Intshcut}",${PID_IS_URL}' ; Undocumented
!define FMTID_InternetSite {000214A1-0000-0000-C000-000000000046}
!define PID_INTSITE_LASTVISIT 4 ; VT_FILETIME
!define PID_INTSITE_VISITCOUNT 6 ; VT_UI4
/**************************************************
Helper macros
**************************************************/
!define V_GetVT '!insertmacro V_GetVT '
!macro V_GetVT pPV sysdst
System::Call '*${pPV}(&i2.${sysdst})'
!macroend
!define V_SetVT '!insertmacro V_SetVT '
!macro V_SetVT pPV syssrc
System::Call '*${pPV}(&i2 ${syssrc})'
!macroend
!macro V_GetHelper sysvaltyp pPV sysdst
System::Call '*${pPV}(l,${sysvaltyp}.${sysdst})'
!macroend
!macro V_GenericSetHelper sysvaltyp pPV VT syssrc
!if "${VT}" != "" ; Setting the VT is optional
System::Call '*${pPV}(&i2 ${VT},&i6,${sysvaltyp}${syssrc})'
!else
System::Call '*${pPV}(l,${sysvaltyp}${syssrc})'
!endif
!macroend
!macro V_SpecificSetHelper VT sysvaltyp pPV syssrc
System::Call '*${pPV}(&i2 ${VT},&i6,${sysvaltyp}${syssrc})'
!macroend
!macro Make_V_GetterSetter name sysvaltyp setsep
!define V_Get${name} '!insertmacro V_GetHelper "${sysvaltyp}" '
!ifdef VT_${name}
!define V_Set${name} '!insertmacro V_SpecificSetHelper ${VT_${name}} "${sysvaltyp}${setsep}" '
!else
!define V_Set${name} '!insertmacro V_GenericSetHelper "${sysvaltyp}${setsep}" '
!endif
!macroend
!insertmacro Make_V_GetterSetter Int8 "&i1" " " ; Generic
!insertmacro Make_V_GetterSetter Int16 "&i2" " " ; Generic
!insertmacro Make_V_GetterSetter Int32 "i" "" ; Generic
!insertmacro Make_V_GetterSetter Int64 "l" "" ; Generic
!insertmacro Make_V_GetterSetter Pointer "p" "" ; Generic
!insertmacro Make_V_GetterSetter I4 "i" " "
!insertmacro Make_V_GetterSetter BOOL "&i2" " "
!insertmacro Make_V_GetterSetter FILETIME "l" ""
!macro VariantInit pV
${V_SetVT} ${pV} ${VT_EMPTY}
!macroend
!macro VariantClear pV
System::Call 'OLEAUT32::#9(p${pV})'
!macroend
!macro VariantCopy pDstV pSrcV sysretHR
System::Call 'OLEAUT32::#10(p${pDstV},p${pSrcV})i.${sysretHR}' ; (Frees the destination variant before it copies the source)
!macroend
!macro VariantCopyInd pDstV pSrcV sysretHR
System::Call 'OLEAUT32::#11(p${pDstV},p${pSrcV})i.${sysretHR}' ; (Frees the destination variant before it copies the source)
!macroend
!macro VariantChangeType pDstV pSrcV Flags VT sysretHR
System::Call 'OLEAUT32::#12(p${pDstV},p${pSrcV},i${Flags},i${VT})i.${sysretHR}' ; (Might free the destination on success)
!macroend
!macro PropVariantClear pPV
System::Call 'OLE32::PropVariantClear(p${pPV})' ; WinNT4.SP0+, Win98+, IE4+
!macroend
!macro PropVariantCopy pDstPV pSrcPV sysretHR
System::Call 'OLE32::PropVariantCopy(p${pDstPV},p${pSrcPV})i.${sysretHR}' ; WinNT4.SP0+, Win98+, IE4+ (Does NOT free the destination before it copies the source)
!macroend
!macro PropVariantChangeType pDstPV pSrcPV VT sysretHR
!ifdef NSIS_ARM | NSIS_ARM32 | NSIS_ARMNT | NSIS_ARM64
System::Call 'PROPSYS::PropVariantChangeType(p${pDstPV},p${pSrcPV},i0,i${VT})i.${sysretHR}'
!else
Push "${VT}"
Push ${pSrcPV}
Push ${pDstPV}
!include Util.nsh
${CallArtificialFunction} TryPropVariantChangeType
System::Call 'KERNEL32::SetLastError(is${sysretHR})' ; A hack to move the result from the stack to somewhere with System variable syntax
!endif
!macroend
!macro TryPropVariantChangeType
System::Store S
System::Call 'PROPSYS::PropVariantChangeType(psr1,psr2,i0,isr3)i.r0' ; Vista+ (Source and destination cannot be the same address)
StrCmp $0 error "" done
System::Call 'OLE32::PropVariantChangeType(pr1,pr2,i0,i0,ir3})i.r0' ; 2000+ (Source and destination cannot be the same address)
!if ${NSIS_PTR_SIZE} < 8
StrCmp $0 error "" done
!insertmacro VariantChangeType $1 $2 0 $3 r0 ; This is not really correct but there is no PROPVARIANT support on these platforms. Might free the destination!
!endif
done:
Push $0
System::Store L
!macroend
!macro IPropertyStorage_ReadPropById pPS ID pPV sysoutHR
System::Call '*(p${PRSPEC_PROPID},p${ID})p.s'
${IPropertyStorage::ReadMultiple} ${pPS} '(1,pss,p${pPV})${sysoutHR}'
System::Free
!macroend
!macro IPropertyStorage_WritePropById pPS ID pPV sysoutHR
System::Call '*(p${PRSPEC_PROPID},p${ID})p.s'
${IPropertyStorage::WriteMultiple} ${pPS} '(1,pss,p${pPV},2)${sysoutHR}'
System::Free
!macroend
!verbose pop
!endif /* __WIN_PROPKEY__INC */

View File

@ -1,117 +0,0 @@
!ifndef __WIN_RESTARTMANAGER__INC
!define __WIN_RESTARTMANAGER__INC 1
/**************************************************
WinBase.h
**************************************************/
!define /IfNDef RESTART_MAX_CMD_LINE 1024
!define /IfNDef RESTART_NO_CRASH 1
!define /IfNDef RESTART_NO_HANG 2
!define /IfNDef RESTART_NO_PATCH 4
!define /IfNDef RESTART_NO_REBOOT 8 ; Do not restart the process when the system is rebooted due to patch installations
!define /IfNDef RECOVERY_DEFAULT_PING_INTERVAL 5000
!define /IfNDef /math RECOVERY_MAX_PING_INTERVAL 5000 * 60
/**************************************************
RestartManager.h
**************************************************/
!define RM_SESSION_KEY_LEN 16
!define CCH_RM_SESSION_KEY 32
!define CCH_RM_MAX_APP_NAME 255
!define CCH_RM_MAX_SVC_NAME 63
!define RM_INVALID_TS_SESSION -1
!define RM_INVALID_PROCESS -1
!define RmUnknownApp 0
!define RmMainWindow 1
!define RmOtherWindow 2
!define RmService 3
!define RmExplorer 4
!define RmConsole 5
!define RmCritical 1000 ; Application is critical system process where a reboot is required to restart
!define RmForceShutdown 0x1 ; Force unresponsive applications and services to shut down after the timeout period
!define RmShutdownOnlyRegistered 0x10 ; Only shutdown apps if all apps registered for restart (RegisterApplicationRestart)
!define RmStatusUnknown 0
!define RmStatusRunning 1
!define RmStatusStopped 2 ; Application stopped by Restart Manager
!define RmStatusStoppedOther 4
!define RmStatusRestarted 8
!define RmStatusErrorOnStop 0x10
!define RmStatusErrorOnRestart 0x20
!define RmStatusShutdownMasked 0x40
!define RmStatusRestartMasked 0x80
!define RmRebootReasonNone 0
!define RmRebootReasonPermissionDenied 1
!define RmRebootReasonSessionMismatch 2
!define RmRebootReasonCriticalProcess 4
!define RmRebootReasonCriticalService 8
!define RmRebootReasonDetectedSelf 0x10
!define SYSSIZEOF_RM_UNIQUE_PROCESS 12
!define SYSSTRUCT_RM_UNIQUE_PROCESS (i,l)
!include LogicLib.nsh
!include Util.nsh
!macro RestartManager_StartSession outvarhandle
System::Call 'RSTRTMGR::RmStartSession(*i-1s, i0, w)i.s'
Pop ${outvarhandle}
${If} ${outvarhandle} <> 0
${OrIf} ${outvarhandle} == error
Pop ${outvarhandle}
Push ""
${EndIf}
Pop ${outvarhandle}
!macroend
!macro RestartManager_EndSession handle
System::Call 'RSTRTMGR::RmEndSession(i${handle})'
!macroend
!macro RestartManager_RegisterFile handle path
System::Call 'RSTRTMGR::RmRegisterResources(i${handle},i1,*ws,i0,p0,i0,p0)i.r0' "${path}"
!macroend
!macro RestartManager_Shutdown handle
System::Call 'RSTRTMGR::RmShutdown(i${handle}, i${RmForceShutdown}, p0)'
!macroend
!macro RestartManager_Restart handle
System::Call 'RSTRTMGR::RmRestart(i${handle}, i0, p0)'
!macroend
!macro RestartManager_ShutdownFile fullpath outvar_errcode
Push "${fullpath}"
!insertmacro CallArtificialFunction RestartManager_ShutdownFileImp
Pop ${outvar_errcode}
!macroend
!macro RestartManager_ShutdownFileImp
Exch $1
Push $0
System::Call 'RSTRTMGR::RmStartSession(*i-1s, i0, w)i.r0'
${If} $0 == error
Pop $0
StrCpy $0 1150
${Else}
System::Call 'RSTRTMGR::RmRegisterResources(isr1,i1,*wr1,i0,p0,i0,p0)i.r0'
${If} $0 = 0
System::Call 'RSTRTMGR::RmShutdown(ir1, i${RmForceShutdown}, p0)i.r0'
${EndIf}
System::Call 'RSTRTMGR::RmEndSession(ir1)'
${EndIf}
Exch
Pop $1
Exch $0
!macroend
!endif ;~ Include guard

View File

@ -1,67 +0,0 @@
!ifndef __WIN_WINDEF__INC
!define __WIN_WINDEF__INC
!verbose push
!verbose 3
!ifndef __WIN_NOINC_WINDEF
!define /ifndef MAX_PATH 260
#define NULL 0
!macro _Win_MINMAX _intcmp _j1 _j2 _outvar _a _b
${_intcmp} "${_a}" "${_b}" ${_j1} ${_j1} ${_j2}
StrCpy ${_outvar} "${_a}"
goto +2
StrCpy ${_outvar} "${_b}"
!macroend
!ifndef __WIN_MS_NOMINMAX & min & max & min_u & max_u
!define min "!insertmacro _Win_MINMAX IntCmp +1 +3 "
!define max "!insertmacro _Win_MINMAX IntCmp +3 +1 "
!define min_u "!insertmacro _Win_MINMAX IntCmpU +1 +3 "
!define max_u "!insertmacro _Win_MINMAX IntCmpU +3 +1 "
!endif
!macro _Win_LOBYTE _outvar _in
IntOp ${_outvar} "${_in}" & 0xFF
!macroend
!define LOBYTE "!insertmacro _Win_LOBYTE "
!macro _Win_HIBYTE _outvar _in
IntOp ${_outvar} "${_in}" >> 8
${LOBYTE} ${_outvar} ${_outvar}
!macroend
!define HIBYTE "!insertmacro _Win_HIBYTE "
!macro _Win_LOWORD _outvar _in
IntOp ${_outvar} "${_in}" & 0xFFFF
!macroend
!define LOWORD "!insertmacro _Win_LOWORD "
!macro _Win_HIWORD _outvar _in
IntOp ${_outvar} "${_in}" >>> 16
!macroend
!define HIWORD "!insertmacro _Win_HIWORD "
!macro _Win_MAKEWORD _outvar _tmpvar _lo _hi
${LOBYTE} ${_outvar} "${_hi}"
${LOBYTE} ${_tmpvar} "${_lo}"
IntOp ${_outvar} ${_outvar} << 8
IntOp ${_outvar} ${_outvar} | ${_tmpvar}
!macroend
!define MAKEWORD "!insertmacro _Win_MAKEWORD "
!macro _Win_MAKELONG32 _outvar _tmpvar _wlo _whi
${LOWORD} ${_outvar} "${_wlo}"
IntOp ${_tmpvar} "${_whi}" << 16
IntOp ${_outvar} ${_outvar} | ${_tmpvar}
!macroend
!define MAKELONG "!insertmacro _Win_MAKELONG32 "
!define MAKEWPARAM "${MAKELONG}"
!define MAKELPARAM "${MAKELONG}"
!define MAKELRESULT "${MAKELONG}"
!endif /* __WIN_NOINC_WINDEF */
!verbose pop
!endif /* __WIN_WINDEF__INC */

View File

@ -1,155 +0,0 @@
!ifndef __WIN_WINERROR__INC
!define __WIN_WINERROR__INC
!verbose push
!verbose 3
!ifndef __WIN_NOINC_WINERROR
#define NO_ERROR 0
!define ERROR_SUCCESS 0
!define ERROR_INVALID_FUNCTION 1
!define ERROR_FILE_NOT_FOUND 2
!define ERROR_PATH_NOT_FOUND 3
!define ERROR_TOO_MANY_OPEN_FILES 4
!define ERROR_ACCESS_DENIED 5
!define ERROR_INVALID_HANDLE 6
!define ERROR_ARENA_TRASHED 7
!define ERROR_NOT_ENOUGH_MEMORY 8
!define ERROR_INVALID_BLOCK 9
!define ERROR_BAD_ENVIRONMENT 10
!define ERROR_BAD_FORMAT 11
!define ERROR_INVALID_ACCESS 12
!define ERROR_INVALID_DATA 13
!define ERROR_OUTOFMEMORY 14
!define ERROR_INVALID_DRIVE 15
!define ERROR_CURRENT_DIRECTORY 16
!define ERROR_NOT_SAME_DEVICE 17
!define ERROR_NO_MORE_FILES 18
!define ERROR_WRITE_PROTECT 19
!define ERROR_BAD_UNIT 20
!define ERROR_NOT_READY 21
!define ERROR_BAD_COMMAND 22
!define ERROR_CRC 23
!define ERROR_BAD_LENGTH 24
!define ERROR_SEEK 25
!define ERROR_NOT_DOS_DISK 26
!define ERROR_SECTOR_NOT_FOUND 27
!define ERROR_OUT_OF_PAPER 28
!define ERROR_WRITE_FAULT 29
!define ERROR_READ_FAULT 30
!define ERROR_GEN_FAILURE 31
!define ERROR_SHARING_VIOLATION 32
!define ERROR_LOCK_VIOLATION 33
!define ERROR_WRONG_DISK 34
!define ERROR_SHARING_BUFFER_EXCEEDED 36
!define ERROR_HANDLE_EOF 38
!define ERROR_HANDLE_DISK_FULL 39
!define ERROR_NOT_SUPPORTED 50
!define ERROR_CANNOT_MAKE 82 ; "The directory or file cannot be created"
!define ERROR_INVALID_PARAMETER 87
!define ERROR_DISK_FULL 112
!define ERROR_CALL_NOT_IMPLEMENTED 120 ; "This function is not supported on this system"
!define ERROR_INSUFFICIENT_BUFFER 122
!define ERROR_INVALID_NAME 123 ; "The filename, directory name, or volume label syntax is incorrect"
!define ERROR_MOD_NOT_FOUND 126 ; "The specified module could not be found"
!define ERROR_BAD_ARGUMENTS 160
!define ERROR_BAD_PATHNAME 161
!define ERROR_LOCK_FAILED 167 ; "Unable to lock a region of a file"
!define ERROR_BUSY 170 ; "The requested resource is in use"
!define ERROR_ALREADY_EXISTS 183 ; "Cannot create a file when that file already exists"
!define ERROR_FILENAME_EXCED_RANGE 206 ; "The filename or extension is too long"
!define ERROR_EXE_MACHINE_TYPE_MISMATCH 216 ; "This version of %1 is not compatible with the version of Windows you're running"
!define ERROR_IMAGE_SUBSYSTEM_NOT_PRESENT 308
!define ERROR_DATA_CHECKSUM_ERROR 323
!define ERROR_ELEVATION_REQUIRED 740
!define ERROR_SERVICE_DOES_NOT_EXIST 1060
!define ERROR_NO_MEDIA_IN_DRIVE 1112
!define ERROR_NO_UNICODE_TRANSLATION 1113
!define ERROR_DLL_INIT_FAILED 1114
!define ERROR_SHUTDOWN_IN_PROGRESS 1115
!define ERROR_OLD_WIN_VERSION 1150 ; "The specified program requires a newer version of Windows"
!define ERROR_APP_WRONG_OS 1151 ; "The specified program is not a Windows or MS-DOS program"
!define ERROR_SINGLE_INSTANCE_APP 1152 ; "Cannot start more than one instance of the specified program"
!define ERROR_RMODE_APP 1153 ; "The specified program was written for an earlier version of Windows"
!define ERROR_INVALID_DLL 1154
!define ERROR_NO_ASSOCIATION 1155
!define ERROR_DDE_FAIL 1156
!define ERROR_DLL_NOT_FOUND 1157
!define ERROR_NOT_FOUND 1168 ; "Element not found"
!define ERROR_NO_MATCH 1169 ; "There was no match for the specified key in the index"
!define ERROR_NO_VOLUME_ID 1173
!define ERROR_UNABLE_TO_REMOVE_REPLACED 1175 ; "Unable to remove the file to be replaced"
!define ERROR_UNABLE_TO_MOVE_REPLACEMENT 1176
!define ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 1177
!define ERROR_SHUTDOWN_IS_SCHEDULED 1190
!define ERROR_SHUTDOWN_USERS_LOGGED_ON 1191 ; "The system shutdown cannot be initiated because there are other users logged on to the computer"
!define ERROR_NO_NETWORK 1222
!define ERROR_CANCELLED 1223 ; "The operation was canceled by the user"
!define ERROR_RETRY 1237
!define ERROR_SERVICE_NOT_FOUND 1243
!define ERROR_NOT_AUTHENTICATED 1244
!define ERROR_UNIDENTIFIED_ERROR 1287
!define ERROR_PRIVILEGE_NOT_HELD 1314
!define ERROR_LOGON_FAILURE 1326 ; "The user name or password is incorrect"
!define ERROR_INTERNAL_ERROR 1359 ; "An internal error occurred"
!define ERROR_FILE_CORRUPT 1392 ; "The file or directory is corrupted and unreadable"
!define ERROR_INVALID_WINDOW_HANDLE 1400 ; "Invalid window handle"
!define ERROR_INVALID_INDEX 1413
!define ERROR_TIMEOUT 1460
!define ERROR_SYMLINK_NOT_SUPPORTED 1464
!define ERROR_XML_PARSE_ERROR 1465
!define ERROR_RESTART_APPLICATION 1467 ; "This application must be restarted"
!define ERROR_INSTALL_USEREXIT 1602 ; "User cancelled installation"
!define ERROR_INSTALL_FAILURE 1603 ; "Fatal error during installation"
!define ERROR_INSTALL_SUSPEND 1604 ; "Installation suspended, incomplete"
!define ERROR_UNKNOWN_PRODUCT 1605 ; "This action is only valid for products that are currently installed"
!define ERROR_BAD_CONFIGURATION 1610
!define ERROR_INSTALL_SOURCE_ABSENT 1612
!define ERROR_PRODUCT_UNINSTALLED 1614
!define ERROR_INSTALL_ALREADY_RUNNING 1618 ; "Another installation is already in progress. Complete that installation before proceeding with this install."
!define ERROR_INSTALL_PACKAGE_INVALID 1620
!define ERROR_INSTALL_LOG_FAILURE 1622
!define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623
!define ERROR_FUNCTION_FAILED 1627
!define ERROR_DATATYPE_MISMATCH 1629
!define ERROR_UNSUPPORTED_TYPE 1630
!define ERROR_INSTALL_TEMP_UNWRITABLE 1632 ; "The Temp folder is on a drive that is full or is inaccessible"
!define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633 ; "This installation package is not supported by this processor type. Contact your product vendor."
!define ERROR_PRODUCT_VERSION 1638 ; "Another version of this product is already installed"
!define ERROR_SUCCESS_REBOOT_INITIATED 1641 ; "The requested operation completed successfully. The system will be restarted so the changes can take effect."
!define ERROR_INSTALL_REJECTED 1654 ; "The app that you are trying to run is not supported on this version of Windows"
!define ERROR_TAG_NOT_FOUND 2012
!define ERROR_BAD_USERNAME 2202 ; "The user name or group name parameter is invalid"
!define ERROR_SUCCESS_REBOOT_REQUIRED 3010
!define ERROR_SUCCESS_RESTART_REQUIRED 3011
!define ERROR_INSTALL_INVALID_PACKAGE 15602
!define ERROR_INSTALL_OUT_OF_DISK_SPACE 15604
!define ERROR_INSTALL_CANCEL 15608 ; "User cancelled the install request"
!define ERROR_INSTALL_FAILED 15609
!define ERROR_REMOVE_FAILED 15610
!define ERROR_NEEDS_REMEDIATION 15612 ; "The application cannot be started. Try reinstalling the application to fix the problem."
!define SEVERITY_SUCCESS 0
!define SEVERITY_ERROR 1
!define FACILITY_STORAGE 3
!define FACILITY_WIN32 7
!define FACILITY_SECURITY 9
!define FACILITY_SETUPAPI 15
!define FACILITY_SXS 23
!define /IfNDef S_OK 0
!define /IfNDef S_FALSE 1
!define E_UNEXPECTED 0x8000FFFF
!define E_NOTIMPL 0x80004001
!define E_OUTOFMEMORY 0x8007000E
!define E_INVALIDARG 0x80070057
!define E_NOINTERFACE 0x80004002
!define E_POINTER 0x80004003
!define E_HANDLE 0x80070006
!define E_ABORT 0x80004004
!define E_FAIL 0x80004005
!define E_ACCESSDENIED 0x80070005
!define E_PENDING 0x8000000A
!endif /* __WIN_NOINC_WINERROR */
!verbose pop
!endif /* __WIN_WINERROR__INC */

View File

@ -1,224 +0,0 @@
!ifndef __WIN_WINNT__INC
!define __WIN_WINNT__INC
!verbose push
!verbose 3
!ifndef __WIN_NOINC_WINNT
#define MINCHAR 0x80
#define MAXCHAR 0x7f
!define MINSHORT 0x8000
!define MAXSHORT 0x7fff
!define MINLONG 0x80000000
!define MAXLONG 0x7fffffff
!define MAXBYTE 0xff
!define MAXWORD 0xffff
!define MAXDWORD 0xffffffff
!ifndef WIN32_NO_STATUS
!define STATUS_WAIT_0 0x00000000
!define STATUS_ABANDONED_WAIT_0 0x00000080
!define STATUS_USER_APC 0x000000C0
!define STATUS_TIMEOUT 0x00000102
!define STATUS_PENDING 0x00000103
!define DBG_EXCEPTION_HANDLED 0x00010001
!define DBG_CONTINUE 0x00010002
!define STATUS_SEGMENT_NOTIFICATION 0x40000005
!define DBG_TERMINATE_THREAD 0x40010003
!define DBG_TERMINATE_PROCESS 0x40010004
!define DBG_CONTROL_C 0x40010005
!define DBG_CONTROL_BREAK 0x40010008
!define DBG_COMMAND_EXCEPTION 0x40010009
!define STATUS_GUARD_PAGE_VIOLATION 0x80000001
!define STATUS_DATATYPE_MISALIGNMENT 0x80000002
!define STATUS_BREAKPOINT 0x80000003
!define STATUS_SINGLE_STEP 0x80000004
!define DBG_EXCEPTION_NOT_HANDLED 0x80010001
!define STATUS_ACCESS_VIOLATION 0xC0000005
!define STATUS_IN_PAGE_ERROR 0xC0000006
!define STATUS_INVALID_HANDLE 0xC0000008
!define STATUS_NO_MEMORY 0xC0000017
!define STATUS_ILLEGAL_INSTRUCTION 0xC000001D
!define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025
!define STATUS_INVALID_DISPOSITION 0xC0000026
!define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
!define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
!define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
!define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
!define STATUS_FLOAT_INVALID_OPERATION 0xC0000090
!define STATUS_FLOAT_OVERFLOW 0xC0000091
!define STATUS_FLOAT_STACK_CHECK 0xC0000092
!define STATUS_FLOAT_UNDERFLOW 0xC0000093
!define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094
!define STATUS_INTEGER_OVERFLOW 0xC0000095
!define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096
!define STATUS_STACK_OVERFLOW 0xC00000FD
!define STATUS_CONTROL_C_EXIT 0xC000013A
!define STATUS_FLOAT_MULTIPLE_FAULTS 0xC00002B4
!define STATUS_FLOAT_MULTIPLE_TRAPS 0xC00002B5
!define STATUS_REG_NAT_CONSUMPTION 0xC00002C9
!define STATUS_SXS_EARLY_DEACTIVATION 0xC015000F
!define STATUS_SXS_INVALID_DEACTIVATION 0xC0150010
!endif /*WIN32_NO_STATUS*/
#define MAXIMUM_WAIT_OBJECTS 64
!define DELETE 0x00010000
!define READ_CONTROL 0x00020000
!define WRITE_DAC 0x00040000
!define WRITE_OWNER 0x00080000
!define SYNCHRONIZE 0x00100000
!define STANDARD_RIGHTS_REQUIRED 0x000F0000
!define STANDARD_RIGHTS_READ ${READ_CONTROL}
!define STANDARD_RIGHTS_WRITE ${READ_CONTROL}
!define STANDARD_RIGHTS_EXECUTE ${READ_CONTROL}
!define STANDARD_RIGHTS_ALL 0x001F0000
!define SPECIFIC_RIGHTS_ALL 0x0000FFFF
!define ACCESS_SYSTEM_SECURITY 0x01000000
!define MAXIMUM_ALLOWED 0x02000000
!define GENERIC_READ 0x80000000
!define GENERIC_WRITE 0x40000000
!define GENERIC_EXECUTE 0x20000000
!define GENERIC_ALL 0x10000000
!define SE_PRIVILEGE_ENABLED_BY_DEFAULT 0x00000001
!define SE_PRIVILEGE_ENABLED 0x00000002
!define SE_PRIVILEGE_REMOVED 0x00000004
!define SE_PRIVILEGE_USED_FOR_ACCESS 0x80000000
!define SE_CREATE_TOKEN_NAME "SeCreateTokenPrivilege"
!define SE_ASSIGNPRIMARYTOKEN_NAME "SeAssignPrimaryTokenPrivilege"
!define SE_LOCK_MEMORY_NAME "SeLockMemoryPrivilege"
!define SE_INCREASE_QUOTA_NAME "SeIncreaseQuotaPrivilege"
!define SE_UNSOLICITED_INPUT_NAME "SeUnsolicitedInputPrivilege"
!define SE_MACHINE_ACCOUNT_NAME "SeMachineAccountPrivilege"
!define SE_TCB_NAME "SeTcbPrivilege"
!define SE_SECURITY_NAME "SeSecurityPrivilege"
!define SE_TAKE_OWNERSHIP_NAME "SeTakeOwnershipPrivilege"
!define SE_LOAD_DRIVER_NAME "SeLoadDriverPrivilege"
!define SE_SYSTEM_PROFILE_NAME "SeSystemProfilePrivilege"
!define SE_SYSTEMTIME_NAME "SeSystemtimePrivilege"
!define SE_PROF_SINGLE_PROCESS_NAME "SeProfileSingleProcessPrivilege"
!define SE_INC_BASE_PRIORITY_NAME "SeIncreaseBasePriorityPrivilege"
!define SE_CREATE_PAGEFILE_NAME "SeCreatePagefilePrivilege"
!define SE_CREATE_PERMANENT_NAME "SeCreatePermanentPrivilege"
!define SE_BACKUP_NAME "SeBackupPrivilege"
!define SE_RESTORE_NAME "SeRestorePrivilege"
!define SE_SHUTDOWN_NAME "SeShutdownPrivilege"
!define SE_DEBUG_NAME "SeDebugPrivilege"
!define SE_AUDIT_NAME "SeAuditPrivilege"
!define SE_SYSTEM_ENVIRONMENT_NAME "SeSystemEnvironmentPrivilege"
!define SE_CHANGE_NOTIFY_NAME "SeChangeNotifyPrivilege"
!define SE_REMOTE_SHUTDOWN_NAME "SeRemoteShutdownPrivilege"
!define SE_UNDOCK_NAME "SeUndockPrivilege"
!define SE_SYNC_AGENT_NAME "SeSyncAgentPrivilege"
!define SE_ENABLE_DELEGATION_NAME "SeEnableDelegationPrivilege"
!define SE_MANAGE_VOLUME_NAME "SeManageVolumePrivilege"
!define SE_IMPERSONATE_NAME "SeImpersonatePrivilege"
!define SE_CREATE_GLOBAL_NAME "SeCreateGlobalPrivilege"
!define TOKEN_ASSIGN_PRIMARY 0x0001
!define TOKEN_DUPLICATE 0x0002
!define TOKEN_IMPERSONATE 0x0004
!define TOKEN_QUERY 0x0008
!define TOKEN_QUERY_SOURCE 0x0010
!define TOKEN_ADJUST_PRIVILEGES 0x0020
!define TOKEN_ADJUST_GROUPS 0x0040
!define TOKEN_ADJUST_DEFAULT 0x0080
!define TOKEN_ADJUST_SESSIONID 0x0100
!define TOKEN_ALL_ACCESS_P 0xF00FF
!define /math TOKEN_ALL_ACCESS ${TOKEN_ALL_ACCESS_P} | ${TOKEN_ADJUST_SESSIONID}
!define /math TOKEN_READ ${STANDARD_RIGHTS_READ} | ${TOKEN_QUERY}
!define TOKEN_WRITE 0x200E0 ;(STANDARD_RIGHTS_WRITE|TOKEN_ADJUST_PRIVILEGES|TOKEN_ADJUST_GROUPS|TOKEN_ADJUST_DEFAULT)
!define TOKEN_EXECUTE ${STANDARD_RIGHTS_EXECUTE}
!define PROCESS_TERMINATE 0x0001
!define PROCESS_CREATE_THREAD 0x0002
!define PROCESS_SET_SESSIONID 0x0004
!define PROCESS_VM_OPERATION 0x0008
!define PROCESS_VM_READ 0x0010
!define PROCESS_VM_WRITE 0x0020
!define PROCESS_DUP_HANDLE 0x0040
!define PROCESS_CREATE_PROCESS 0x0080
!define PROCESS_SET_QUOTA 0x0100
!define PROCESS_SET_INFORMATION 0x0200
!define PROCESS_QUERY_INFORMATION 0x0400
!define PROCESS_SUSPEND_RESUME 0x0800
!define PROCESS_ALL_ACCESS 0x1F0FFF ;(STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF)
!define THREAD_TERMINATE 0x0001
!define THREAD_SUSPEND_RESUME 0x0002
!define THREAD_GET_CONTEXT 0x0008
!define THREAD_SET_CONTEXT 0x0010
!define THREAD_SET_INFORMATION 0x0020
!define THREAD_QUERY_INFORMATION 0x0040
!define THREAD_SET_THREAD_TOKEN 0x0080
!define THREAD_IMPERSONATE 0x0100
!define THREAD_DIRECT_IMPERSONATION 0x0200
!define THREAD_ALL_ACCESS 0x1F03FF ;(STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3FF)
!define JOB_OBJECT_ASSIGN_PROCESS 0x0001
!define JOB_OBJECT_SET_ATTRIBUTES 0x0002
!define JOB_OBJECT_QUERY 0x0004
!define JOB_OBJECT_TERMINATE 0x0008
!define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 0x0010
!define JOB_OBJECT_ALL_ACCESS 0x1F001F ;(STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1F )
!define EVENT_MODIFY_STATE 0x0002
!define EVENT_ALL_ACCESS 0x1F0003 ;(STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
!define MUTANT_QUERY_STATE 0x0001
!define MUTANT_ALL_ACCESS 0x1F0001 ;(STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE)
!define FILE_SHARE_READ 0x00000001
!define FILE_SHARE_WRITE 0x00000002
!define FILE_SHARE_DELETE 0x00000004
!define FILE_ATTRIBUTE_READONLY 0x00000001
!define FILE_ATTRIBUTE_HIDDEN 0x00000002
!define FILE_ATTRIBUTE_SYSTEM 0x00000004
!define FILE_ATTRIBUTE_DIRECTORY 0x00000010
!define FILE_ATTRIBUTE_ARCHIVE 0x00000020
!define FILE_ATTRIBUTE_DEVICE 0x00000040
!define FILE_ATTRIBUTE_NORMAL 0x00000080
!define FILE_ATTRIBUTE_TEMPORARY 0x00000100
!define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
!define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
!define FILE_ATTRIBUTE_COMPRESSED 0x00000800
!define FILE_ATTRIBUTE_OFFLINE 0x00001000
!define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
!define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
!define DUPLICATE_CLOSE_SOURCE 0x00000001
!define DUPLICATE_SAME_ACCESS 0x00000002
!define /ifndef VER_PLATFORM_WIN32s 0
!define /ifndef VER_PLATFORM_WIN32_WINDOWS 1
!define /ifndef VER_PLATFORM_WIN32_NT 2
!ifndef REG_SZ & NSIS_WINDOWS__NO_REGTYPES
!define REG_NONE 0
!define REG_SZ 1
!define REG_EXPAND_SZ 2
!define REG_BINARY 3
!define REG_DWORD 4
!define REG_DWORD_LITTLE_ENDIAN 4
!define REG_DWORD_BIG_ENDIAN 5
!define REG_LINK 6
!define REG_MULTI_SZ 7
!endif
!define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
!define PROCESSOR_ARCHITECTURE_INTEL 0 ; x86
!define PROCESSOR_ARCHITECTURE_ARM 5
!define PROCESSOR_ARCHITECTURE_IA64 6 ; Itanium
!define PROCESSOR_ARCHITECTURE_AMD64 9 ; x86-64/x64
!define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10
!define PROCESSOR_ARCHITECTURE_ARM64 12
!define PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64 13
!define IMAGE_FILE_MACHINE_UNKNOWN 0
!define IMAGE_FILE_MACHINE_I386 332 ; x86
!define IMAGE_FILE_MACHINE_ARMNT 452
!define IMAGE_FILE_MACHINE_IA64 512 ; Itanium
!define IMAGE_FILE_MACHINE_AMD64 34404 ; x86-64/x64
!define IMAGE_FILE_MACHINE_ARM64 43620
!endif /* __WIN_NOINC_WINNT */
!verbose pop
!endif /* __WIN_WINNT__INC */

View File

@ -1,199 +0,0 @@
!ifndef __WIN_WINUSER__INC
!define __WIN_WINUSER__INC
!verbose push
!verbose 3
!ifndef __WIN_MS_NOUSER & __WIN_NOINC_WINUSER
!ifndef __WIN_MS_NOVIRTUALKEYCODES
!define VK_LBUTTON 0x01
!define VK_RBUTTON 0x02
!define VK_CANCEL 0x03
!define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
!define VK_XBUTTON1 0x05 /* NOT contiguous with L & RBUTTON */
!define VK_XBUTTON2 0x06 /* NOT contiguous with L & RBUTTON */
!define VK_BACK 0x08
!define VK_TAB 0x09
!define VK_CLEAR 0x0C
!define VK_RETURN 0x0D
!define VK_SHIFT 0x10
!define VK_CONTROL 0x11
!define VK_MENU 0x12
!define VK_PAUSE 0x13
!define VK_CAPITAL 0x14
!define VK_ESCAPE 0x1B
!define VK_CONVERT 0x1C
!define VK_NONCONVERT 0x1D
!define VK_ACCEPT 0x1E
!define VK_MODECHANGE 0x1F
!define VK_SPACE 0x20
!define VK_PRIOR 0x21
!define VK_NEXT 0x22
!define VK_END 0x23
!define VK_HOME 0x24
!define VK_LEFT 0x25
!define VK_UP 0x26
!define VK_RIGHT 0x27
!define VK_DOWN 0x28
!define VK_SELECT 0x29
!define VK_PRINT 0x2A
!define VK_EXECUTE 0x2B
!define VK_SNAPSHOT 0x2C
!define VK_INSERT 0x2D
!define VK_DELETE 0x2E
!define VK_HELP 0x2F
; VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39)
; VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)
!define VK_LWIN 0x5B
!define VK_RWIN 0x5C
!define VK_APPS 0x5D
!define VK_SLEEP 0x5F
!define VK_NUMPAD0 0x60
!define VK_NUMPAD1 0x61
!define VK_NUMPAD2 0x62
!define VK_NUMPAD3 0x63
!define VK_NUMPAD4 0x64
!define VK_NUMPAD5 0x65
!define VK_NUMPAD6 0x66
!define VK_NUMPAD7 0x67
!define VK_NUMPAD8 0x68
!define VK_NUMPAD9 0x69
!define VK_MULTIPLY 0x6A
!define VK_ADD 0x6B
!define VK_SEPARATOR 0x6C
!define VK_SUBTRACT 0x6D
!define VK_DECIMAL 0x6E
!define VK_DIVIDE 0x6F
!define VK_F1 0x70
!define VK_F2 0x71
!define VK_F3 0x72
!define VK_F4 0x73
!define VK_F5 0x74
!define VK_F6 0x75
!define VK_F7 0x76
!define VK_F8 0x77
!define VK_F9 0x78
!define VK_F10 0x79
!define VK_F11 0x7A
!define VK_F12 0x7B
!define VK_NUMLOCK 0x90
!define VK_SCROLL 0x91
!define VK_OEM_NEC_EQUAL 0x92 ; '=' key on numpad
!define VK_LSHIFT 0xA0
!define VK_RSHIFT 0xA1
!define VK_LCONTROL 0xA2
!define VK_RCONTROL 0xA3
!define VK_LMENU 0xA4
!define VK_RMENU 0xA5
!endif
!ifndef __WIN_MS_NOWINOFFSETS
!define /ifndef GWL_STYLE -16
!define /ifndef GWL_EXSTYLE -20
!define /ifndef GWLP_WNDPROC -4
!define /ifndef GWLP_HINSTANCE -6
!define /ifndef GWLP_HWNDPARENT -8
!define /ifndef GWLP_USERDATA -21
!define /ifndef GWLP_ID -12
!define DWLP_MSGRESULT 0
!define /math DWLP_DLGPROC ${DWLP_MSGRESULT} + ${NSIS_PTR_SIZE} ;DWLP_MSGRESULT + sizeof(LRESULT)
!define /math DWLP_USER ${DWLP_DLGPROC} + ${NSIS_PTR_SIZE} ;DWLP_DLGPROC + sizeof(DLGPROC)
!endif
!ifndef __WIN_MS_NONCMESSAGES
!define HTERROR -2
!define HTTRANSPARENT -1
!define HTNOWHERE 0
!define HTCLIENT 1
!define HTCAPTION 2
!define HTSYSMENU 3
!define HTGROWBOX 4
!define HTSIZE ${HTGROWBOX}
!define HTMENU 5
!define HTHSCROLL 6
!define HTVSCROLL 7
!define HTMINBUTTON 8
!define HTMAXBUTTON 9
!define HTLEFT 10
!define HTRIGHT 11
!define HTTOP 12
!define HTTOPLEFT 13
!define HTTOPRIGHT 14
!define HTBOTTOM 15
!define HTBOTTOMLEFT 16
!define HTBOTTOMRIGHT 17
!define HTBORDER 18
!define HTREDUCE ${HTMINBUTTON}
!define HTZOOM ${HTMAXBUTTON}
!define HTSIZEFIRST ${HTLEFT}
!define HTSIZELAST ${HTBOTTOMRIGHT}
!define HTOBJECT 19
!define HTCLOSE 20
!define HTHELP 21
!endif
!ifndef __WIN_MS_NOSYSCOMMANDS
!define SC_SIZE 0xF000
!define SC_MOVE 0xF010
!define SC_MINIMIZE 0xF020
!define SC_MAXIMIZE 0xF030
!define SC_NEXTWINDOW 0xF040
!define SC_PREVWINDOW 0xF050
!define SC_CLOSE 0xF060
!define SC_VSCROLL 0xF070
!define SC_HSCROLL 0xF080
!define SC_MOUSEMENU 0xF090
!define SC_KEYMENU 0xF100
!define SC_ARRANGE 0xF110
!define SC_RESTORE 0xF120
!define SC_TASKLIST 0xF130
!define SC_SCREENSAVE 0xF140
!define SC_HOTKEY 0xF150
!define SC_DEFAULT 0xF160
!define SC_MONITORPOWER 0xF170
!define SC_CONTEXTHELP 0xF180
!define SC_SEPARATOR 0xF00F
!endif
!define /ifndef IDC_ARROW 32512
!define /ifndef IDC_IBEAM 32513
!define /ifndef IDC_WAIT 32514
!define /ifndef IDC_CROSS 32515
!define /ifndef IDC_UPARROW 32516
!define /ifndef IDC_SIZE 32640
!define /ifndef IDC_ICON 32641
!define /ifndef IDC_SIZENWSE 32642
!define /ifndef IDC_SIZENESW 32643
!define /ifndef IDC_SIZEWE 32644
!define /ifndef IDC_SIZENS 32645
!define /ifndef IDC_SIZEALL 32646
!define /ifndef IDC_NO 32648
!define /ifndef IDC_HAND 32649
!define /ifndef IDC_APPSTARTING 32650
!define /ifndef IDC_HELP 32651
!define /ifndef IMAGE_BITMAP 0
!define /ifndef IMAGE_ICON 1
!define /ifndef IMAGE_CURSOR 2
!define /ifndef IMAGE_ENHMETAFILE 3
!define /ifndef LR_DEFAULTCOLOR 0x0000
!define /ifndef LR_MONOCHROME 0x0001
!define /ifndef LR_COLOR 0x0002
!define /ifndef LR_COPYRETURNORG 0x0004
!define /ifndef LR_COPYDELETEORG 0x0008
!define /ifndef LR_LOADFROMFILE 0x0010
!define /ifndef LR_LOADTRANSPARENT 0x0020
!define /ifndef LR_DEFAULTSIZE 0x0040
!define /ifndef LR_VGACOLOR 0x0080
!define /ifndef LR_LOADMAP3DCOLORS 0x1000
!define /ifndef LR_CREATEDIBSECTION 0x2000
!define /ifndef LR_COPYFROMRESOURCE 0x4000
!define /ifndef LR_SHARED 0x8000
!define GA_PARENT 1
!define GA_ROOT 2
!define GA_ROOTOWNER 3
!endif /* __WIN_MS_NOUSER & __WIN_NOINC_WINUSER */
!verbose pop
!endif /* __WIN_WINUSER__INC */

View File

@ -1,263 +0,0 @@
/*
WinCore.nsh & Win\*.nsh - Collection of common windows defines
!define __WIN_NOINC_xxx to exclude a windows header file
!define __WIN_MS_xxx to exclude specific things (The original #ifdef xxx checks can be found in the official Microsoft headers)
*/
!ifndef __WIN_WINDOWS__INC
!define __WIN_WINDOWS__INC
!verbose push
!verbose 3
!include Win\WinDef.nsh
!include Win\WinError.nsh
!include Win\WinNT.nsh
!include Win\WinUser.nsh
!ifndef __WIN_MS_NOWINMESSAGES
!include WinMessages.nsh
!endif
/**************************************************
WinBase.h
**************************************************/
!ifndef __WIN_NOINC_WINBASE
!define /ifndef INVALID_HANDLE_VALUE -1
!define /ifndef INVALID_FILE_SIZE 0xFFFFFFFF
!define /ifndef INVALID_SET_FILE_POINTER -1
!define /ifndef INVALID_FILE_ATTRIBUTES -1
!define WAIT_FAILED 0xFFFFFFFF
!define WAIT_OBJECT_0 0 ;((STATUS_WAIT_0 ) + 0 )
!define WAIT_ABANDONED 0x80 ;((STATUS_ABANDONED_WAIT_0 ) + 0 )
!define WAIT_ABANDONED_0 0x80 ;((STATUS_ABANDONED_WAIT_0 ) + 0 )
!define DRIVE_UNKNOWN 0
!define DRIVE_NO_ROOT_DIR 1
!define DRIVE_REMOVABLE 2
!define DRIVE_FIXED 3
!define DRIVE_REMOTE 4
!define DRIVE_CDROM 5
!define DRIVE_RAMDISK 6
!define FILE_TYPE_UNKNOWN 0x0000
!define FILE_TYPE_DISK 0x0001
!define FILE_TYPE_CHAR 0x0002
!define FILE_TYPE_PIPE 0x0003
!define FILE_TYPE_REMOTE 0x8000
!define STD_INPUT_HANDLE -10
!define STD_OUTPUT_HANDLE -11
!define STD_ERROR_HANDLE -12
#define IGNORE 0 ; Ignore signal
!define INFINITE 0xFFFFFFFF ; Infinite timeout
!endif /* __WIN_NOINC_WINBASE */
/**************************************************
WinGDI.h
**************************************************/
!ifndef __WIN_MS_NOGDI & __WIN_NOINC_WINGDI
!define HORZRES 8
!define VERTRES 10
!define BITSPIXEL 12
!define LOGPIXELSX 88
!define LOGPIXELSY 90
!define COLORRES 108
!define VREFRESH 116
!define DESKTOPVERTRES 117
!define DESKTOPHORZRES 118
!endif /* __WIN_MS_NOGDI & __WIN_NOINC_WINGDI */
/**************************************************
WinReg.h
**************************************************/
!ifndef __WIN_NOINC_WINREG
!ifndef __WIN_NOHKEY & HKEY_CLASSES_ROOT & HKEY_CURRENT_USER & HKEY_LOCAL_MACHINE & HKEY_USERS
!define HKEY_CLASSES_ROOT 0x80000000
!define HKEY_CURRENT_USER 0x80000001
!define HKEY_LOCAL_MACHINE 0x80000002
!define HKEY_USERS 0x80000003
!define HKEY_PERFORMANCE_DATA 0x80000004
!define HKEY_PERFORMANCE_TEXT 0x80000050
!define HKEY_PERFORMANCE_NLSTEXT 0x80000060
!define HKEY_CURRENT_CONFIG 0x80000005
!define HKEY_DYN_DATA 0x80000006
!ifndef __WIN_NOSHORTHKEY & HKCR & HKCU & HKLM
!define HKCR ${HKEY_CLASSES_ROOT}
!define HKCU ${HKEY_CURRENT_USER}
!define HKLM ${HKEY_LOCAL_MACHINE}
!endif
!endif
!endif /* __WIN_NOINC_WINREG */
/**************************************************
WindowsX.h
**************************************************/
!ifndef __WIN_NOINC_WINDOWSX
!ifndef GET_X_LPARAM & GET_Y_LPARAM
!macro _Win_GET_X_LPARAM _outvar _in
IntOp ${_outvar} "${_in}" << 16 ;We can't just use LOWORD, we need to keep the sign,
IntOp ${_outvar} ${_outvar} >> 16 ;so we let NSIS sign extend for us
!macroend
!define GET_X_LPARAM "!insertmacro _Win_GET_X_LPARAM "
!macro _Win_GET_Y_LPARAM _outvar _in
IntOp ${_outvar} "${_in}" >> 16
!macroend
!define GET_Y_LPARAM "!insertmacro _Win_GET_Y_LPARAM "
!endif
!endif /* __WIN_NOINC_WINDOWSX */
/**************************************************
ShlObj.h
**************************************************/
!ifndef __WIN_NOINC_SHLOBJ
!ifndef __WIN_NOSHELLFOLDERCSIDL
!define CSIDL_DESKTOP 0x0000
!define CSIDL_INTERNET 0x0001 ;Internet Explorer (icon on desktop)
!define CSIDL_PROGRAMS 0x0002 ;Start Menu\Programs
!define CSIDL_CONTROLS 0x0003 ;My Computer\Control Panel
!define CSIDL_PRINTERS 0x0004 ;My Computer\Printers
!define CSIDL_PERSONAL 0x0005 ;My Documents
!define CSIDL_FAVORITES 0x0006 ;<user name>\Favorites
!define CSIDL_STARTUP 0x0007 ;Start Menu\Programs\Startup
!define CSIDL_RECENT 0x0008 ;<user name>\Recent
!define CSIDL_SENDTO 0x0009 ;<user name>\SendTo
!define CSIDL_BITBUCKET 0x000a ;<desktop>\Recycle Bin
!define CSIDL_STARTMENU 0x000b ;<user name>\Start Menu
!define CSIDL_MYDOCUMENTS 0x000c ;logical "My Documents" desktop icon
!define CSIDL_MYMUSIC 0x000d ;"My Music" folder
!define CSIDL_MYVIDEO 0x000e ;"My Videos" folder
!define CSIDL_DESKTOPDIRECTORY 0x0010 ;<user name>\Desktop
!define CSIDL_DRIVES 0x0011 ;My Computer
!define CSIDL_NETWORK 0x0012 ;Network Neighborhood
!define CSIDL_NETHOOD 0x0013 ;<user name>\nethood
!define CSIDL_FONTS 0x0014 ;windows\fonts
!define CSIDL_TEMPLATES 0x0015
!define CSIDL_COMMON_STARTMENU 0x0016 ;All Users\Start Menu
!define CSIDL_COMMON_PROGRAMS 0x0017 ;All Users\Start Menu\Programs
!define CSIDL_COMMON_STARTUP 0x0018 ;All Users\Startup
!define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 ;All Users\Desktop
!define CSIDL_APPDATA 0x001a ;<user name>\Application Data
!define CSIDL_PRINTHOOD 0x001b ;<user name>\PrintHood
!define CSIDL_LOCAL_APPDATA 0x001c ;<user name>\Local Settings\Application Data (non roaming)
!define CSIDL_ALTSTARTUP 0x001d ;non localized startup
!define CSIDL_COMMON_ALTSTARTUP 0x001e ;non localized common startup
!define CSIDL_COMMON_FAVORITES 0x001f
!define CSIDL_INTERNET_CACHE 0x0020
!define CSIDL_COOKIES 0x0021
!define CSIDL_HISTORY 0x0022
!define CSIDL_COMMON_APPDATA 0x0023 ;All Users\Application Data
!define CSIDL_WINDOWS 0x0024 ;GetWindowsDirectory
!define CSIDL_SYSTEM 0x0025 ;GetSystemDirectory
!define CSIDL_PROGRAM_FILES 0x0026 ;C:\Program Files
!define CSIDL_MYPICTURES 0x0027
!define CSIDL_PROFILE 0x0028 ;USERPROFILE
!define CSIDL_SYSTEMX86 0x0029 ;x86 system directory on RISC
!define CSIDL_PROGRAM_FILESX86 0x002a ;x86 C:\Program Files on RISC
!define CSIDL_PROGRAM_FILES_COMMON 0x002b ;C:\Program Files\Common
!define CSIDL_PROGRAM_FILES_COMMONX86 0x002c ;x86 Program Files\Common on RISC
!define CSIDL_COMMON_TEMPLATES 0x002d ;All Users\Templates
!define CSIDL_COMMON_DOCUMENTS 0x002e ;All Users\Documents
!define CSIDL_COMMON_ADMINTOOLS 0x002f ;All Users\Start Menu\Programs\Administrative Tools
!define CSIDL_ADMINTOOLS 0x0030 ;<user name>\Start Menu\Programs\Administrative Tools
!define CSIDL_CONNECTIONS 0x0031 ;Network and Dial-up Connections
!define CSIDL_COMMON_MUSIC 0x0035 ;All Users\My Music
!define CSIDL_COMMON_PICTURES 0x0036 ;All Users\My Pictures
!define CSIDL_COMMON_VIDEO 0x0037 ;All Users\My Video
!define CSIDL_RESOURCES 0x0038 ;Resource Directory
!define CSIDL_RESOURCES_LOCALIZED 0x0039 ;Localized Resource Directory
!define CSIDL_COMMON_OEM_LINKS 0x003a ;Links to All Users OEM specific apps
!define CSIDL_CDBURN_AREA 0x003b ;USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
!define CSIDL_COMPUTERSNEARME 0x003d ;Computers Near Me (computered from Workgroup membership)
!define CSIDL_FLAG_CREATE 0x8000 ;combine with CSIDL_ value to force folder creation in SHGetFolderPath()
!define CSIDL_FLAG_DONT_VERIFY 0x4000 ;combine with CSIDL_ value to return an unverified folder path
!define CSIDL_FLAG_NO_ALIAS 0x1000 ;combine with CSIDL_ value to insure non-alias versions of the pidl
!define CSIDL_FLAG_PER_USER_INIT 0x0800 ;combine with CSIDL_ value to indicate per-user init (eg. upgrade)
!define CSIDL_FLAG_MASK 0xFF00
!endif /* __WIN_NOSHELLFOLDERCSIDL */
!endif /* __WIN_NOINC_SHLOBJ */
/**************************************************
Shobjidl.h
**************************************************/
!ifndef __WIN_NOINC_SHOBJIDL
; ASSOCIATIONLEVEL
!define AL_MACHINE 0
!define AL_EFFECTIVE 1
!define AL_USER 2
; ASSOCIATIONTYPE
!define AT_FILEEXTENSION 0
!define AT_URLPROTOCOL 1
!define AT_STARTMENUCLIENT 2
!define AT_MIMETYPE 3
!endif /* __WIN_NOINC_SHOBJIDL */
/**************************************************
ShlGuid.h
**************************************************/
!ifndef __WIN_NOINC_SHLGUID
!define FOLDERID_Public {DFDF76A2-C82A-4D63-906A-5644AC457385} ; Vista+ Fixed=%SystemDrive%\Users\Public
!define FOLDERID_Games {CAC52C1A-B53D-4edc-92D7-6B2E8AC19434} ; Vista+ && < 10 (1803) Virtual
!define FOLDERID_SavedGames {4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4} ; Vista+ PerUser=%USERPROFILE%\Saved Games
!define FOLDERID_GameTasks {054FAE61-4DD8-4787-80B6-090220C4B700} ; Vista+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\GameExplorer
!define FOLDERID_PublicGameTasks {DEBF2536-E1A8-4c59-B6A2-414586476AEA} ; Vista+ Common=%ALLUSERSPROFILE%\Microsoft\Windows\GameExplorer
!define FOLDERID_Contacts {56784854-C6CB-462b-8169-88E350ACB882} ; Vista+ PerUser=%USERPROFILE%\Contacts
!define FOLDERID_Downloads {374DE290-123F-4565-9164-39C4925E467B} ; Vista+ PerUser=%USERPROFILE%\Downloads
!define FOLDERID_PublicDownloads {3D644C9B-1FB8-4f30-9B45-F670235F79C0} ; Vista+ Common=%PUBLIC%\Downloads
!define FOLDERID_UserProfiles {0762D272-C50A-4BB0-A382-697DCD729B80} ; Vista+ Fixed=%SystemDrive%\Users
!define FOLDERID_UserProgramFiles {5CD7AEE2-2219-4A67-B85D-6C9CE15660CB} ; 7+ PerUser=%LOCALAPPDATA%\Programs
!define FOLDERID_UserProgramFilesCommon {BCBD3057-CA5C-4622-B42D-BC56DB0AE516} ; 7+ PerUser=%LOCALAPPDATA%\Programs\Common
!define FOLDERID_PublicLibraries {48DAF80B-E6CF-4F4E-B800-0E69D84EE384} ; 7+ Common=%ALLUSERSPROFILE%\Microsoft\Windows\Libraries
!define FOLDERID_UserPinned {9E3995AB-1F9C-4F13-B827-48B24B6C7174} ; 7+ PerUser=%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned
!define FOLDERID_ImplicitAppShortcuts {BCB5256F-79F6-4CEE-B725-DC34E402FD46} ; 7+ PerUser=%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts
!define FOLDERID_DeviceMetadataStore {5CE4A5E9-E4EB-479D-B89F-130C02886155} ; 7+ Common=%ALLUSERSPROFILE%\Microsoft\Windows\DeviceMetadataStore
!define FOLDERID_ApplicationShortcuts {A3918781-E5F2-4890-B3D9-A7E54332328C} ; 8.0+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\Application Shortcuts
!define FOLDERID_RoamingTiles {00BCFC5A-ED94-4e48-96A1-3F6217F21990} ; 8.0+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\RoamingTiles
!define FOLDERID_RoamedTileImages {AAA8D5A5-F1D6-4259-BAA8-78E7EF60835E} ; 8.0+ PerUser=%LOCALAPPDATA%\Microsoft\Windows\RoamedTileImages
!define FOLDERID_PublicUserTiles {0482af6c-08f1-4c34-8c90-e17ec98b1e17} ; 8.0+ Common=%PUBLIC%\AccountPictures
!define FOLDERID_AccountPictures {008ca0b1-55b4-4c56-b8a8-4de4b299d3be} ; 8.0+ PerUser=%APPDATA%\Microsoft\Windows\AccountPictures
!define FOLDERID_Screenshots {b7bede81-df94-4682-a7d8-57a52620b86f} ; 8.0+ PerUser=%USERPROFILE%\Pictures\Screenshots
!define FOLDERID_SkyDrive {A52BBA46-E9E1-435f-B3D9-28DAA648C0F6} ; 8.1+ PerUser=%USERPROFILE%\OneDrive
!define FOLDERID_AppDataProgramData {559D40A3-A036-40FA-AF61-84CB430A4D34} ; 10 (1709)+ PerUser=%LOCALAPPDATA%\ProgramData
!endif /* __WIN_NOINC_SHLGUID */
!verbose pop
!endif /* __WIN_WINDOWS__INC */

File diff suppressed because it is too large Load Diff

View File

@ -1,120 +0,0 @@
; ---------------------
; x64.nsh
; ---------------------
;
; A few simple macros to handle installations on x64 machines.
;
; RunningX64 checks if the installer is running on a 64-bit OS.
; IsWow64 checks if the installer is a 32-bit application running on a 64-bit OS.
;
; ${If} ${RunningX64}
; MessageBox MB_OK "Running on 64-bit Windows"
; ${EndIf}
;
; IsNative* checks the OS native CPU architecture.
;
; ${If} ${IsNativeAMD64}
; ; Install AMD64 64-bit driver/library
; ${ElseIf} ${IsNativeARM64}
; ; Install ARM64 64-bit driver/library
; ${ElseIf} ${IsNativeIA32}
; ; Install i386 32-bit driver/library
; ${Else}
; Abort "Unsupported CPU architecture!"
; ${EndIf}
;
; ${If} ${IsNativeAMD64}
; File "amd64\myapp.exe"
; ${ElseIf} ${IsNativeIA32}
; ${OrIf} ${IsWow64}
; File "x86\myapp.exe"
; ${Else}
; Abort "Unsupported CPU architecture!"
; ${EndIf}
;
; DisableX64FSRedirection disables file system redirection.
; EnableX64FSRedirection enables file system redirection.
;
; SetOutPath $SYSDIR
; ${DisableX64FSRedirection}
; File something.bin # extracts to C:\Windows\System32
; ${EnableX64FSRedirection}
; File something.bin # extracts to C:\Windows\SysWOW64
;
!ifndef ___X64__NSH___
!define ___X64__NSH___
!include LogicLib.nsh
!define IsWow64 `"" IsWow64 ""`
!macro _IsWow64 _a _b _t _f
!insertmacro _LOGICLIB_TEMP
System::Call kernel32::GetCurrentProcess()p.s
System::Call kernel32::IsWow64Process2(ps,*i0s,*i) ; [Win10.1511+] 0 if not WOW64
Push |
System::Call kernel32::IsWow64Process(p-1,*i0s) ; [WinXP+] FALSE for a 32-bit application on ARM64!
System::Int64Op
Pop $_LOGICLIB_TEMP
!insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
!macroend
!define RunningX64 `"" RunningX64 ""`
!macro _RunningX64 _a _b _t _f
!if ${NSIS_PTR_SIZE} > 4
!insertmacro LogicLib_JumpToBranch `${_t}` `${_f}`
!else
!insertmacro _IsWow64 `${_a}` `${_b}` `${_t}` `${_f}`
!endif
!macroend
!define GetNativeMachineArchitecture "!insertmacro GetNativeMachineArchitecture "
!macro GetNativeMachineArchitecture outvar
!define GetNativeMachineArchitecture_lbl lbl_GNMA_${__COUNTER__}
System::Call kernel32::GetCurrentProcess()p.s
System::Call kernel32::IsWow64Process2(ps,*i,*i0s)
Pop ${outvar}
IntCmp ${outvar} 0 "" ${GetNativeMachineArchitecture_lbl}_done ${GetNativeMachineArchitecture_lbl}_done
!if "${NSIS_PTR_SIZE}" <= 4
!if "${NSIS_CHAR_SIZE}" <= 1
System::Call 'USER32::CharNextW(w"")p.s'
Pop ${outvar}
IntPtrCmpU ${outvar} 0 "" ${GetNativeMachineArchitecture_lbl}_oldnt ${GetNativeMachineArchitecture_lbl}_oldnt
StrCpy ${outvar} 332 ; Always IMAGE_FILE_MACHINE_I386 on Win9x
Goto ${GetNativeMachineArchitecture_lbl}_done
${GetNativeMachineArchitecture_lbl}_oldnt:
!endif
!endif
System::Call '*0x7FFE002E(&i2.s)'
Pop ${outvar}
${GetNativeMachineArchitecture_lbl}_done:
!undef GetNativeMachineArchitecture_lbl
!macroend
!macro _IsNativeMachineArchitecture _ignore _arc _t _f
!insertmacro _LOGICLIB_TEMP
${GetNativeMachineArchitecture} $_LOGICLIB_TEMP
!insertmacro _= $_LOGICLIB_TEMP ${_arc} `${_t}` `${_f}`
!macroend
!define IsNativeMachineArchitecture `"" IsNativeMachineArchitecture `
!define IsNativeIA32 '${IsNativeMachineArchitecture} 332' ; Intel x86
!define IsNativeAMD64 '${IsNativeMachineArchitecture} 34404' ; x86-64/x64
!define IsNativeARM64 '${IsNativeMachineArchitecture} 43620'
!define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection"
!macro DisableX64FSRedirection
System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
!macroend
!define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection"
!macro EnableX64FSRedirection
System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
!macroend
!endif # !___X64__NSH___