+ Modern Windows versions support multiple users accounts on a single computer, each
+ with different privileges. For security reasons, the privileges of applications
+ can also be limited. For an installer, the execution level and installation
+ mode are important. The execution level determines the privileges of the
+ installer application. For example, to install hardware drivers, administrator privileges
+ are required. Applications can also be installed for a single user or for all users
+ on a computer, which is determined by the installation mode. Installation for all
+ users requires a higher execution level as compared with a single user setup. The
+ MultiUser.nsh header files provides the features to automatically handle all these
+ aspects related to user accounts and installer privileges.
+
+ Note that all settings need to be set before including the MultiUser.nsh header
+ file.
+
+ Before the MultiUser.nsh file is included, the MULTIUSER_EXECUTIONLEVEL define should
+ be set to one of the following values depending on the execution level that is required:
+
+ Insert the MULTIUSER_INIT and MULTIUSER_UNINT macros in the .onInit and un.onInit
+ function to verify these privileges. If no uninstaller is created in the script,
+ set MULTIUSER_NOUNINSTALL.
+
+ Whether the required privileges can be obtained depends on the user that starts
+ the installer:
+
+ It is recommended to insert these initialization macros before macros that require
+ user intervention. For example, it does not make sense to ask a user for an installer
+ language if the installer will quit afterwards because the user account does not
+ have the required privileges. After the macros are inserted, the variable $MultiUser.Privileges
+ will contain the current execution level (Admin, Power, User or Guest).
+
+ The following additional settings are available to customize the initialization:
+
+ As mentioned before, applications can both be installed for a single users or for
+ all users on a computer. Applications for all users are typically installed in the
+ Program Files folder and appear in the Start Menu of every user. On the contrary,
+ applications for a single user are usually installed in the local Application Data
+ folder and only a appear in the Start Menu of the user who installed the application.
+
+ By default, MultiUser.nsh will set the installation mode for a per-machine installation
+ if Administrator or Power User rights are available (this is always the case if
+ the execution level is set to Admin or Power, if Highest is set it depends on the
+ user account). For the Standard execution level the installation will always be
+ for a single user. On Windows 95/98/Me installation for a single user is not possible.
+
+ The following settings are available to change the default installation mode:
+
+ After initialization, the variable $MultiUser.InstallMode will contain the current
+ installation mode (AllUsers or CurrentUser).
+
+
+ For the Admin and Power levels, both a per-machine as well as a per-user installation
+ is possible. If the Highest level is set and the user is an Administrator or Power
+ User, both options are also available.
+
+ Usually it's a good thing to give the user to choice between these options. For
+ users of the Modern UI version 2, a page is provided that asks the user for the
+ installation mode. To use this page, define MULTIUSER_MUI before including User.nsh.
+ Then, the MULTIUSER_PAGE_INSTALLMODE macro can be used just like a normal Modern
+ UI page (this page will automatically be skipped when running Windows 95/98/Me):
+
+ The MULTIUSER_INSTALLMODE_COMMANDLINE setting that also appears in this example
+ enables the installation mode to be set using the /AllUsers or /CurrentUser command
+ line parameters. This is especially useful for silent setup.
+
+ The following settings can be used to customize the texts on the page (in addition
+ to the general Modern UI page settings):
+
+ The SetShellVarContext flag (which determines the folders for e.g. shortcuts, like
+ $DESKTOP) is automatically set depending on the installation mode. In addition,
+ the following settings can be used to perform additional actions when the installation
+ mode is initialized:
+
+ To set the installation mode manually, call one of these four functions:
+ The System plug-in gives developers the ability to call any exported function from any DLL. For example, you can use it to call GetLogicalDriveStrings to get a list of available drives on the user's computer.
+
+The System plug-in also allows the developer to allocate, free and copy memory; interact with COM objects and perform mathematical operations on 64-bit integers.
+
+Programming knowledge is highly recommended for good understanding of the System plug-in.
+
+
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
diff --git a/KattekerCreator/nsis/Docs/makensisw/Readme.txt b/KattekerCreator/nsis/Docs/makensisw/Readme.txt
new file mode 100644
index 0000000..7193292
--- /dev/null
+++ b/KattekerCreator/nsis/Docs/makensisw/Readme.txt
@@ -0,0 +1,228 @@
+----------------------------------------------------
+MakeNSISW - MakeNSIS Windows Wrapper
+----------------------------------------------------
+
+
+About MakeNSISW
+---------------
+MakeNSISW is a wrapper for the MakeNSIS that is distributed with
+NSIS (http://www.nullsoft.com/free/nsis/). MakeNSISW allows you
+to compile NSIS scripts using a Windows GUI interface. To install
+MakeNSISW, compile the source using Visual C++ or Mingw.
+
+
+Requirements
+------------
+MakeNSISW requires NSIS be installed on your system. The default
+directory for this installation is $PROGRAMFILES\NSIS\Contrib\MakeNSISW.
+
+
+Usage:
+------
+If you installed the Shell Extensions option during the installation, then
+all that is required is that you choose 'Compile NSI' from the right-
+click menu on a NSIS script. This will invoke MakeNSISW.
+
+The format of the parameters when calling MakeNSISW from the commandline is:
+ makensisw [options] [script.nsi | - [...]]
+
+For the options, please see the MakeNSIS documentation.
+
+
+Shortcut Keys
+-------------
+Ctrl+A: Select All text
+Ctrl+B: Open Script Folder
+Ctrl+C: Copy selected text
+Ctrl+D: Opens the Define Symbols dialog
+Ctrl+E: Edits the script
+Ctrl+F: Find text
+Ctrl+L: Load a script
+Ctrl+R: Recompiles the script
+Ctrl+T: Tests the installer
+Ctrl+W: Clear Log Window
+Alt+X: Exits the application
+F1: View Documentation
+
+
+Version History
+---------------
+0.1
+ - Initial Release
+
+0.2
+ - Added ability to save output and copy output
+
+0.3
+ - Added option to recompile script (F2 or File|Recompile)
+ - Added Help Menu
+ - Return code is now always set
+ - Added Accelerator key support for Exit and Recompile
+ - No longer uses NSIS's version string
+ - Made clearer status message in title bar
+ - Disabled menu/accelerator functions during compile
+
+0.4
+ - Fixed Copy Selected bug
+
+0.5
+ - Minor Makefile changes (mingw)
+ - Moved strings into global strings to make editing easier
+ - Added Clear Log Command under Edit menu
+ - Recompile no longer clears the log window (use F5)
+ - Close is now the default button when you hit enter
+ - added VC++ project, updated resources to work with VC++
+ - rearranged directory structure
+ - makefiles now target ../../makensisw.exe
+ - removed makensisw home link in help menu (hope this is ok,
+ doesn't really seem needed to me)
+ - made display use a fixed width font (Some people may not like
+ this, but I do)
+ - added 'test' button (peeks output for 'Output' line)
+ - made it so that the log shows the most recent 32k.
+ - made it so that the log always clears on a recompile.
+ - compiled with VC++ so no longer needs msvcrt.dll
+ - made the compiler name be a full path (for more flexibility)
+
+0.6
+ - print correct usage if unable to execute compiler
+ - removed mingw warnings
+ - set title/branding before errors
+ - some docs changes
+ - Added Edit|Edit Script function
+
+0.7
+ - Edit Script should now work for output>32k
+ - Added resize support (thanks to felfert)
+ - Added window position saving (thanks to felfert)
+ - Disable some items when exec of makensis failed
+
+0.8
+ - Added window size constraints (thanks to bcheck)
+ - Cleaned up the resource file
+
+0.9
+ - Removed global strings (moved into #defines)
+ - Some GUI changes
+ - No longer focused Close button (its default anyways)
+ - Fixed resize bug on minimize/restore (thanks to felfert)
+ - Made window placement stored in HKLM instead of HKCU, cause
+ I hate things that get littered in HKCU.
+
+1.0
+ - Fixed bug with large output causing crash
+
+1.1
+ - Crash may actually be fixed
+
+1.2
+ - XP visual style support
+
+1.3
+ - Added Documentation menu item
+ - Fix GUI problem with About dialog
+
+1.4
+ - Edit Script command will now work with or without file associations
+ - Added default filename for save dialog
+ - Use standard fonts
+ - Documentation menuitem caused recompile
+
+1.5
+ - Fixed Copy All function
+
+1.6
+ - Reduced size from 44k to 12k (kichik)
+ - Editbox not limited to 32k (now using richedit control)
+ - Made the log window font-size smaller.
+
+1.7
+ - Added check for warnings
+ - Added sound for sucessfull compilations
+ - Update home page and documentation menu items to Sourceforge page
+
+1.8
+ - Contents of log window are now streamed in
+ - Empty log window check (to prevent random crashes)
+
+1.9
+ - Text always scrolls to bottom (kichik)
+ - Updated link to new docs
+ - Makensisw now takes the same parameters as makensis.exe
+ - Fixed some random crashes
+ - Drag and Drop Support into the Makensisw window
+ - Updated icon to more sexy one
+ - Added Load Script option on File menu
+ - Added Search Dialog (Ctrl+F) (kichik)
+ - Added Select All (Ctrl+A), Copy (Ctrl+C), Exit (Alt+X) keys
+ - Branding text now reflects NSIS version
+ - Added some simple tool tips
+ - Added Context Menu in log window
+ - Added resize gripper
+ - Ctrl+L loads a script
+ - Added Clear Log (Ctrl+W)
+ - Browse Script (Ctrl+B) launches explorer in script directory
+ - Check for Update command
+ - Added link to the NSIS Forum under Help menu
+ - Bunch of other stuff not worth mentioning
+ - Define Symbols menu (Ctrl+D)
+
+2.0
+ - Improved user interface
+ - Define Symbols is available even if a script is not loaded
+ - Defined Symbols are saved on exit and reloaded on start
+ - Added NSIS Update menu
+ - Added toolbar for commonly used menus
+ - Made the Toolbar style flat
+ - Added option for compile & run
+ - Added compressor setting option
+ - Added support for lzma compression
+ - Added named Symbols sets.
+
+2.1
+ - Added "Cancel compilation" menu item
+
+2.2
+- Settings saved in HKCU instead of HKLM
+- Added menu accelerators to MRU list
+
+2.3
+- Escape button closes MakeNSISw
+
+2.3.1
+- Fixed broken command line parameter handling
+
+2.3.2
+- The size gripper can be used to resize the window
+
+2.3.3
+- Update check switched from JNetLib to WinInet
+- New file type icons
+
+2.3.4
+- Added Window Info/Spy feature
+- System DPI aware
+- New toolbar images
+
+
+Copyright Information
+---------------------
+Copyright (c) 2002 Robert Rainwater
+Contributors: Justin Frankel, Fritz Elfert, Amir Szekely,
+ Sunil Kamath, Joost Verburg, Anders Kjersem.
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
diff --git a/KattekerCreator/nsis/Docs/nsDialogs/Readme.html b/KattekerCreator/nsis/Docs/nsDialogs/Readme.html
new file mode 100644
index 0000000..ad03ec1
--- /dev/null
+++ b/KattekerCreator/nsis/Docs/nsDialogs/Readme.html
@@ -0,0 +1,838 @@
+
+
+
+nsDialogs
+
+
+
+
+
+NSIS nsDialogs Plug-in
+Next generation of user interface design
+
+Table of Contents
+
+
+- Introduction
+-
+Step-by-Step Tutorial
+
+
+-
+Function Reference
+
+
+-
+Macro Reference
+
+- NSD_Create*
+- NSD_OnBack, NSD_OnChange, NSD_OnClick, NSD_OnNotify
+- NSD_SetFocus
+- NSD_CreateTimer, NSD_KillTimer
+- NSD_AddStyle, NSD_AddExStyle
+- NSD_GetText, NSD_SetText
+- Text, Password & Number:
+NSD_Edit_SetTextLimit,
+NSD_Edit_SetReadOnly,
+NSD_Edit_SetCueBannerText
+
+- RichEdit:
+NSD_RichEd_SetTextLimit,
+NSD_RichEd_SetEventMask,
+NSD_RichEd_SetCustomBackgroundColor
+
+- CheckBox & RadioButton:
+NSD_GetState,
+NSD_SetState,
+NSD_Check,
+NSD_Uncheck
+
+- ComboBox & DropList:
+NSD_CB_AddString,
+NSD_CB_PrependString, NSD_CB_AppendString, NSD_CB_InsertString,
+NSD_CB_SelectString,
+NSD_CB_GetCount
+
+- ListBox:
+NSD_LB_AddString,
+NSD_LB_PrependString, NSD_LB_AppendString, NSD_LB_InsertString,
+NSD_LB_DelString,
+NSD_LB_DelItem,
+NSD_LB_Clear,
+NSD_LB_GetCount,
+NSD_LB_SelectString,
+NSD_LB_GetSelection
+
+- Animation:
+NSD_Anim_OpenFile,
+NSD_Anim_Play,
+NSD_Anim_Stop
+
+- HTrackBar & VTrackBar:
+NSD_TrackBar_GetPos,
+NSD_TrackBar_SetPos,
+NSD_TrackBar_SetRangeMin,
+NSD_TrackBar_SetRangeMax,
+NSD_TrackBar_SetTicFreq
+
+- UpDown:
+NSD_UD_SetBuddy,
+NSD_UD_GetPos,
+NSD_UD_SetPos,
+NSD_UD_SetPackedRange
+
+- HotKey:
+NSD_HK_GetHotKey, NSD_HK_SetHotKey
+
+- Bitmap:
+NSD_SetImage,
+NSD_SetStretchedImage,
+NSD_ClearImage,
+NSD_FreeImage
+
+- Icon:
+NSD_SetIcon,
+NSD_SetIconFromInstaller,
+NSD_ClearIcon,
+NSD_FreeIcon
+
+
+
+- FAQ
+
+
+Introduction
+
+nsDialogs allows creation of custom pages in the installer. On top of the built-in pages, nsDialogs can create pages with any type of controls in any order and arrangement. It can create everything from a simple page with one label to form which reacts to user's actions. Modern UI 2, for example, uses nsDialogs to create the welcome and finish pages.
+
+nsDialogs is a NSIS plug-in, introduced in version 2.29 as a replacement for InstallOptions. nsDialogs doesn't use INI files, so it's way faster than InstallOptions. Integration with the script is tighter and more natural - creating controls is done using plug-in functions and notification is done by directly calling a function in the script. Unlike InstallOptions, there isn't a predefined set of available control type and by providing a lower level access to Windows API, every type of control can be created and pages can be more customizable.
+
+The same thing that makes nsDialogs more flexible can also make it more complicated for users with no knowledge of Win32 API. This is solved by creating a library of predefined functions, defined in script, that allow creation and handling of controls. This way, novices get easy access to the flexibility, while advanced users still get access to the core functionality by modifying the library or simply avoid using it.
+
+Step-by-Step Tutorial
+
+Custom Page
+
+Before you can start adding controls you need to create a nsDialogs custom page. nsDialogs pages can only be created in a custom page's creator function, not in sections nor regular functions. Lets create a basic script with a empty nsDialogs page as our skeleton:
+
+!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+XPStyle on
+
+
+Var Dialog
+
+Page custom nsDialogsPage
+Page instfiles
+
+Function nsDialogsPage
+ nsDialogs::Create 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+
+ nsDialogs::Show
+FunctionEnd
+
+Section
+SectionEnd
+
+The first call must always be to nsDialogs::Create. It will create a new dialog in the page and return its HWND on the stack. The result must be popped from the stack to prevent stack corruption. If the result is error, the dialog couldn't be created and the page must be aborted!
+nsDialogs::Create accepts one parameter. It has a very specific function, but to keep things simple for this tutorial, it must always be 1018.
+HWND is a number that uniquely identifies the dialog and can be used with SendMessage, SetCtlColors and Win32 API functions.
+The dialog is not fully constructed at this point and you can make modifications to it before it is displayed. To finalize and display the dialog you must call nsDialogs::Show. This function will not return until the user clicks Next, Back or Cancel.
+
+
+
+Adding Controls
+
+
+Compiling the last script and running it results in an empty page which is not very useful. So now we'll add some controls to it to. To do so, we'll use ${NSD_Create*} macros from nsDialogs.nsh. Each of those macros takes 5 parameters - x, y, width, height and text. Each macro also returns one value on the stack, which is the new control's HWND. Like the dialogs HWND, it must be popped from the stack and saved.
+
+Each of the measurements that the macros take can use one of three unit types - pixels, dialog units or percentage of the dialog's size. It can also be negative to indicate it should be measured from the end. To use dialog units, the measurement must be suffixed with the letter u. To use percentage, the measurement must be suffixed with the percentage sign - %. Any other suffix, or no suffix, means pixels.
+
+Dialog units allow creation of dialogs that scale well when different fonts or DPI is used. Its size in pixels is determined at runtime based on the font and the DPI. For example, standard pages in the classic NSIS user interface are 266 dialog units wide and 130 dialog units high. Pages in Modern UI are 300 dialogs units wide and 140 dialog units high. In different resolutions, using different fonts or DPI settings, the dialogs will always have the same size in dialog units, but different size in pixels.
+
+!include nsDialogs.nsh
+!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+XPStyle on
+
+Var Dialog
+Var Label
+Var Text
+
+Page custom nsDialogsPage
+Page instfiles
+
+Function nsDialogsPage
+
+ nsDialogs::Create 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
+ Pop $Label
+
+ ${NSD_CreateText} 0 13u 100% -13u "Type something here..."
+ Pop $Text
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Section
+SectionEnd
+
+Available control types that can be created with ${NSD_Create*} are:
+HLine,
+VLine,
+Label,
+Icon,
+Bitmap,
+BrowseButton,
+Link,
+Button,
+GroupBox,
+CheckBox,
+RadioButton,
+Text,
+Password,
+Number,
+FileRequest,
+DirRequest,
+RichEdit,
+ComboBox,
+DropList,
+ListBox,
+SortedListBox,
+ProgressBar,
+Animation,
+HTrackBar,
+VTrackBar,
+UpDown,
+HotKey,
+IPAddress.
+
+
+Control State
+
+
+Now that we have some controls that the user can interact with, it's time to see what the user actually does with them. For that, we'll first add a "leave callback function" to our page. In that function, we'll query the state of the text control we've created and display it to the user. To do so, we'll use the ${NSD_GetText} macro. Use the ${NSD_GetState} macro for RadioButton and CheckBox controls.
+
+Note that not all controls support ${NSD_GetText} and some require special handling with specific messages defined in WinMessages.nsh. For example, the ListBox control requires usage of LB_GETCURSEL and LB_GETTEXT. With time, the library of macros in nsDialogs.nsh will fill with more and more macros that'll handle more cases like this.
+
+!include nsDialogs.nsh
+!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+XPStyle on
+
+Var Dialog
+Var Label
+Var Text
+
+Page custom nsDialogsPage nsDialogsPageLeave
+Page instfiles
+
+Function nsDialogsPage
+
+ nsDialogs::Create 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
+ Pop $Label
+
+ ${NSD_CreateText} 0 13u 100% -13u "Type something here..."
+ Pop $Text
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Function nsDialogsPageLeave
+
+ ${NSD_GetText} $Text $0
+ MessageBox MB_OK "You typed:$\n$\n$0"
+
+FunctionEnd
+
+Section
+SectionEnd
+
+Real-time Notification
+
+
+One of the more exciting new features of nsDialogs is callback function notification of changes to the dialog. nsDialogs can call a function defined in a script in response to a user action such as changing of a text field or click of a button. To make nsDialogs notify us of events, we'll use ${NSD_OnClick} and ${NSD_OnChange}. Not every control supports both of the events. For example, there is nothing to notify about label changes, only clicks.
+
+When the callback function is called, the control's HWND will be waiting on the stack and must be popped to prevent stack corruption. In this simple example, this is not so useful. But in case of a bigger script where several controls are associated with the same callback function, the HWND can shed some light on which control originated the event.
+
+The new example will respond to the user typing "hello" in the text box.
+
+!include nsDialogs.nsh
+!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+XPStyle on
+
+Var Dialog
+Var Label
+Var Text
+
+Page custom nsDialogsPage nsDialogsPageLeave
+Page instfiles
+
+Function nsDialogsPage
+
+ nsDialogs::Create 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
+ Pop $Label
+
+ ${NSD_CreateText} 0 13u 100% -13u "Type something here..."
+ Pop $Text
+ ${NSD_OnChange} $Text nsDialogsPageTextChange
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Function nsDialogsPageLeave
+
+ ${NSD_GetText} $Text $0
+ MessageBox MB_OK "You typed:$\n$\n$0"
+
+FunctionEnd
+
+Function nsDialogsPageTextChange
+
+ Pop $1 # $1 == $ Text
+
+ ${NSD_GetText} $Text $0
+
+ ${If} $0 == "hello"
+
+ MessageBox MB_OK "right back at ya!"
+
+ ${EndIf}
+
+FunctionEnd
+
+Section
+SectionEnd
+
+Memory
+
+So far we have a page that has some basic input controls. But what happens when the user goes to the next page and comes back? With the current code, the user's input will not be remembered. To remember, we'll use the already present leave callback function to store the user's choice in variables and pass these values when creating the controls the next time. For a better example, we'll also add a checkbox to the page and use ${NSD_GetState} and ${NSD_SetState} to get and set its state.
+
+For clarity, we'll remove some of the notifications from the previous step.
+
+!include nsDialogs.nsh
+!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+XPStyle on
+
+Var Dialog
+Var Label
+Var Text
+Var Text_State
+Var Checkbox
+Var Checkbox_State
+
+Page custom nsDialogsPage nsDialogsPageLeave
+Page license
+Page instfiles
+
+Function .onInit
+
+ StrCpy $Text_State "Type something here..."
+
+FunctionEnd
+
+Function nsDialogsPage
+
+ nsDialogs::Create 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
+ Pop $Label
+
+ ${NSD_CreateText} 0 13u 100% 12u $Text_State
+ Pop $Text
+
+ ${NSD_CreateCheckbox} 0 30u 100% 10u "&Something"
+ Pop $Checkbox
+
+ ${If} $Checkbox_State == ${BST_CHECKED}
+ ${NSD_Check} $Checkbox
+ ${EndIf}
+
+ # alternative for the above ${If}:
+ #${NSD_SetState} $Checkbox_State
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Function nsDialogsPageLeave
+
+ ${NSD_GetText} $Text $Text_State
+ ${NSD_GetState} $Checkbox $Checkbox_State
+
+FunctionEnd
+
+Section
+SectionEnd
+
+Function Reference
+
+Create
+nsDialogs::Create rect
+Creates a new dialog. rect specific the identifier of the control whose location will be mimiced. This should usually be 1018, which is control mimiced for creation of built-in pages. The Modern UI also has control 1044 for the welcome and the finish page.
+Returns the new dialog's HWND on the stack or error.
+
+CreateControl
+nsDialogs::CreateControl class style extended_style x y width height text
+Create a new control in the current dialog. A dialog must exist for this to work, so nsDialogs::Create must be called prior to this function.
+Returns the new control's HWND on the stack or error.
+
+Show
+nsDialogs::Show
+Displays the page. Call this once finished with nsDialogs::Create, nsDialogs::CreateControl and the rest.
+Returns nothing.
+
+SelectFileDialog
+nsDialogs::SelectFileDialog mode initial_selection filter
+Displays a file selection dialog to the user. If mode is set to save, displays a file save dialog. If mode is set to open, displays a file open dialog. filter is a list of available file filters separated by pipes. If an empty string is passed, the default is used - All Files|*.*.
+initial_selection can be used to provide the user with a default file to look for and/or a default folder to look in. If initial_selection is empty no default filename will be provided for the user and the dialog will start in the current working directory. If initial_selection specifies just a filename, for example "test.exe", the dialog will be set up to look for a file called test.exe in the current working directory. If initial_selection specifies just a directory, for example "C:\Program Files", the dialog starts in the provided directory with no file name provided. If initial_selection specifies a directory and a filename, for example "C:\Windows\System32\calc.exe", the dialog will be set up to look for a file called calc.exe in the directory C:\Windows\System32.
+Returns the selected file on the stack or an empty string if the user canceled the operation.
+
+SelectFolderDialog
+nsDialogs::SelectFolderDialog title initial_selection
+Displays a directory selection dialog to the user.
+Returns the selected directory on the stack or "error" in case the user canceled the operation or an error occured.
+
+SetRTL
+nsDialogs::SetRTL rtl_setting
+Sets right-to-left mode on or off. If rtl_setting is 0, it's set to off. If rtl_setting is 1, it's set to on. This function must be called before any calls to nsDialogs::CreateControl.
+Returns nothing.
+
+GetUserData
+nsDialogs::GetUserData control_HWND
+Returns user data associated with the control on the stack. Use nsDialogs::SetUserData to set this data.
+
+SetUserData
+nsDialogs::SetUserData control_HWND data
+Associates data with the control. Use nsDialogs::GetUserData to get this data.
+Returns nothing.
+
+OnBack
+nsDialogs::OnBack function_address
+Sets the callback function for the Back button. This function will be called when the user clicks the back button. Call Abort in this function to prevent the user from going back to the last page.
+Use GetFunctionAddress to get the address of the desired callback function.
+Returns nothing.
+
+OnChange
+nsDialogs::OnChange control_HWND function_address
+Sets a change notification callback function for the given control. Whenever the control changes, the function will be called and the control's HWND will be waiting on its stack.
+Use GetFunctionAddress to get the address of the desired callback function.
+Returns nothing.
+
+OnClick
+nsDialogs::OnClick control_HWND function_address
+Sets a click notification callback function for the given control. Whenever the control is clicked, the function will be called and the control's HWND will be waiting on its stack.
+Use GetFunctionAddress to get the address of the desired callback function.
+Returns nothing.
+
+OnNotify
+nsDialogs::OnNotify control_HWND function_address
+Sets a notification callback function for the given control. Whenever the control receives the WM_NOTIFY message, the function will be called and the control's HWND, notification code and a pointer to the NMHDR structure will be waiting on its stack. Use ${NSD_Return} to return a value.
+Use GetFunctionAddress to get the address of the desired callback function.
+Returns nothing.
+
+CreateTimer
+nsDialogs::CreateTimer function_address timer_interval
+Sets a timer that'd call the callback function for the given control every in a constant interval. Interval times are specified in milliseconds.
+Use GetFunctionAddress to get the address of the desired callback function.
+Returns nothing.
+
+KillTimer
+nsDialogs::KillTimer function_address
+Kills a previously set timer.
+Use GetFunctionAddress to get the address of the desired callback function.
+Returns nothing.
+
+Macro Reference
+nsDialogs.nsh contains a lot of macros that can make nsDialogs usage a lot easier. Below is a description of each of those macros including purpose, syntax, input and output.
+
+NSD_Create*
+${NSD_Create*} x y width height text
+Create a new control in the current dialog. A dialog must exist for this to work, so nsDialogs::Create must be called prior to this function.
+Available variants:
+
+- ${NSD_CreateHLine}
+- ${NSD_CreateVLine}
+- ${NSD_CreateLabel}
+- ${NSD_CreateIcon}
+- ${NSD_CreateBitmap}
+- ${NSD_CreateBrowseButton}
+- ${NSD_CreateLink}
+- ${NSD_CreateButton}
+- ${NSD_CreateGroupBox}
+- ${NSD_CreateCheckBox}
+- ${NSD_CreateRadioButton}
+- ${NSD_CreateText}
+- ${NSD_CreatePassword}
+- ${NSD_CreateNumber}
+- ${NSD_CreateFileRequest}
+- ${NSD_CreateDirRequest}
+- ${NSD_CreateRichEdit}
+- ${NSD_CreateComboBox}
+- ${NSD_CreateDropList}
+- ${NSD_CreateListBox}
+- ${NSD_CreateSortedListBox}
+- ${NSD_CreateProgressBar}
+- ${NSD_CreateAnimation}
+- ${NSD_CreateHTrackBar}
+- ${NSD_CreateVTrackBar}
+- ${NSD_CreateUpDown}
+- ${NSD_CreateHotKey}
+- ${NSD_CreateIPAddress} (Requires IE4)
+
+Returns the new control's HWND on the stack or error
+
+NSD_OnBack
+${NSD_OnBack} function_name
+See OnBack for more details.
+
+NSD_OnChange
+${NSD_OnChange} control_HWND function_name
+See OnChange for more details.
+See Real-time Notification for usage example.
+
+NSD_OnClick
+${NSD_OnClick} control_HWND function_name
+See OnClick for more details.
+
+NSD_OnNotify
+${NSD_OnNotify} control_HWND function_name
+See OnNotify for more details.
+
+NSD_Return
+${NSD_Return} value
+Used to return a value back to Windows from a OnNotify callback.
+
+NSD_SetFocus
+${NSD_SetFocus} control_HWND
+Sets focus to a control.
+
+NSD_CreateTimer
+${NSD_CreateTimer} function_name timer_interval
+See CreateTimer for more details.
+
+NSD_KillTimer
+${NSD_KillTimer} function_name
+See KillTimer for more details.
+
+NSD_AddStyle
+${NSD_AddStyle} control_HWND style
+Adds one or more window styles to a control. Multiple styles should be separated with pipes `|'.
+See MSDN for shared and per-control style descriptions.
+
+NSD_AddExStyle
+${NSD_AddExStyle} control_HWND style
+Adds one or more extended window styles to a control. Multiple styles should be separated with pipes `|'.
+See MSDN for style descriptions.
+
+NSD_GetText
+${NSD_GetText} control_HWND $output_variable
+Retrieves the text of a control and stores it into output_variable. Especially useful for textual controls.
+See Control State for usage example.
+
+NSD_SetText
+${NSD_SetText} control_HWND text
+Sets the text of a control.
+
+NSD_Edit_SetTextLimit
+${NSD_Edit_SetTextLimit} control_HWND limit
+Sets the input length limit for a text control.
+
+NSD_Edit_SetReadOnly
+${NSD_Edit_SetReadOnly} control_HWND readonly
+1 to make the text control read-only or 0 to allow the user to input data.
+
+NSD_Edit_SetCueBannerText
+${NSD_Edit_SetCueBannerText} control_HWND displaywhenfocused text
+Set a text hint displayed when the control is empty. The text is only visible on WinXP and later. Requires XPStyle on.
+
+NSD_RichEd_SetTextLimit
+${NSD_RichEd_SetTextLimit} control_HWND limit
+Sets the input length limit.
+
+NSD_RichEd_SetEventMask
+${NSD_RichEd_SetEventMask} control_HWND eventmask
+
+NSD_RichEd_SetCustomBackgroundColor
+${NSD_RichEd_SetCustomBackgroundColor} control_HWND COLORREF
+
+NSD_GetState
+${NSD_GetState} control_HWND $output_variable
+Retrieves the state of a check box or a radio button control. Possible outputs are ${BST_CHECKED} and ${BST_UNCHECKED}.
+See Memory for usage example.
+
+NSD_SetState
+${NSD_SetState} control_HWND state
+Sets the state of a check box or a radio button control. Possible values for state are ${BST_CHECKED} and ${BST_UNCHECKED}.
+See Memory for usage example.
+
+NSD_Check
+${NSD_Check} control_HWND
+Checks a check box or a radio button control. Same as calling ${NSD_SetState} with ${BST_CHECKED}.
+
+NSD_Uncheck
+${NSD_Uncheck} control_HWND
+Unchecks a check box or a radio button control. Same as calling ${NSD_SetState} with ${BST_UNCHECKED}.
+See Memory for usage example.
+
+NSD_CB_AddString
+${NSD_CB_AddString} combo_HWND string
+Adds a string to a combo box.
+
+NSD_CB_InsertString
+${NSD_CB_InsertString} combo_HWND index string
+${NSD_CB_PrependString} combo_HWND string
+${NSD_CB_AppendString} combo_HWND string
+Insert a string in a specified position in a combo box.
+
+NSD_CB_SelectString
+${NSD_CB_SelectString} combo_HWND string
+Selects a string in a combo box.
+
+
+${NSD_CB_GetCount} combo_HWND $output_variable
+
+NSD_LB_AddString
+${NSD_LB_AddString} listbox_HWND string
+Adds a string to a list box.
+
+NSD_LB_InsertString
+${NSD_LB_InsertString} listbox_HWND index string
+${NSD_LB_PrependString} listbox_HWND string
+${NSD_LB_AppendString} listbox_HWND string
+Insert a string in a specified position in a list box.
+
+NSD_LB_DelString
+${NSD_LB_DelString} listbox_HWND string
+Deletes a string from a list box.
+
+NSD_LB_DelItem
+${NSD_LB_DelItem} listbox_HWND itemindex
+Deletes a string from a list box.
+
+
+${NSD_LB_Clear} listbox_HWND
+Deletes all strings from a list box.
+
+
+${NSD_LB_GetCount} listbox_HWND $output_variable
+Retrieves the number of strings from a list box.
+
+NSD_LB_SelectString
+${NSD_LB_SelectString} listbox_HWND string
+Selects a string in a list box.
+
+
+${NSD_LB_GetSelection} listbox_HWND $output_variable
+Retrieves the selected string from a list box. Returns an empty string if no string is selected.
+
+
+${NSD_Anim_OpenFile} anim_HWND avi_path
+Opens the specified (silent) .AVI movie clip.
+
+
+${NSD_Anim_Play} anim_HWND
+Plays the movie clip repeatedly.
+
+
+${NSD_Anim_Stop} anim_HWND
+Stops playback.
+
+
+${NSD_TrackBar_GetPos} track_HWND $output
+
+
+${NSD_TrackBar_SetPos} track_HWND pos
+
+
+${NSD_TrackBar_SetRangeMin} track_HWND minpos
+
+
+${NSD_TrackBar_SetRangeMax} track_HWND maxpos
+
+
+${NSD_TrackBar_SetTicFreq} track_HWND frequency
+Sets the interval frequency for tick marks.
+
+
+${NSD_UD_SetBuddy} ud_HWND buddy_HWND
+
+
+${NSD_UD_GetPos} ud_HWND $output
+
+
+${NSD_UD_SetPos} ud_HWND pos
+
+
+${NSD_UD_SetPackedRange} ud_HWND packedrange
+Sets the min-max range. Two signed 16-bit numbers packed into 32-bits.
+
+
+${NSD_HK_GetHotKey} hk_HWND $output
+Bits 0..7 specify the virtual key code and bits 8..15 specify the HOTKEYF modifier flags.
+
+
+${NSD_HK_SetHotKey} hk_HWND packedhotkey
+
+NSD_SetImage
+${NSD_SetImage} control_HWND image_path $output_variable
+Loads a bitmap from image_path and displays it on control_HWND created by ${NSD_CreateBitmap}. The image handle is stored in output_variable and should be freed using ${NSD_FreeImage} once no longer necessary.
+The image must be extracted to the user's computer prior to calling this macro. A good place to extract images is $PLUGINSDIR.
+!include nsDialogs.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+
+Page custom nsDialogsImage
+Page instfiles
+
+Var Dialog
+Var Image
+Var ImageHandle
+
+Function .onInit
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\image.bmp "${NSISDIR}\Contrib\Graphics\Header\nsis-r.bmp"
+FunctionEnd
+
+Function nsDialogsImage
+ nsDialogs::Create 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateBitmap} 0 0 100% 100% ""
+ Pop $Image
+ ${NSD_SetImage} $Image $PLUGINSDIR\image.bmp $ImageHandle
+
+ nsDialogs::Show
+
+ ${NSD_FreeImage} $ImageHandle
+FunctionEnd
+
+Section
+SectionEnd
+
+NSD_SetStretchedImage
+${NSD_SetStretchedImage} control_HWND image_path $output_variable
+Loads and displays a bitmap just like ${NSD_SetImage}, but stretched the image to fit the control.
+
+NSD_ClearImage
+${NSD_ClearImage} control_HWND
+Clears an image from a control.
+
+NSD_FreeImage
+${NSD_FreeImage} image_handle
+Frees an image handle previously loaded with ${NSD_SetImage} or ${NSD_SetStretchedImage}.
+
+NSD_SetIcon
+${NSD_SetIcon} control_HWND image_path $output_variable
+Same as ${NSD_SetImage}, but used for loading and setting an icon in a control created by ${NSD_CreateIcon}. The image handle is stored in output_variable and should be freed using ${NSD_FreeIcon} once no longer necessary.
+
+NSD_SetIconFromInstaller
+${NSD_SetIconFromInstaller} control_HWND $output_variable
+Loads the icon used in the installer and displays it on control_HWND created by ${NSD_CreateIcon}. The image handle is stored in output_variable and should be freed using ${NSD_FreeIcon} once no longer necessary.
+
+NSD_ClearIcon
+${NSD_ClearIcon} control_HWND
+Clears an icon from a control.
+
+NSD_FreeIcon
+${NSD_FreeIcon} icon_handle
+Frees an icon handle previously loaded with ${NSD_SetIcon} or ${NSD_SetIconFromInstaller}.
+
+
+FAQ
+
+
+
+
+
+-
+Q: Can nsDialogs handle InstallOptions INI files?
+
+A: nsDialogs.nsh contains a function called CreateDialogFromINI that can create nsDialogs' dialog from an INI file. It can handle every type of control InstallOptions supports, but doesn't handle the flags or notifications. Examples\nsDialogs\InstallOptions.nsi shows a usage example of this function.
+
+
+
+
+
+
+
+
+
diff --git a/KattekerCreator/nsis/Docs/nsExec/nsExec.txt b/KattekerCreator/nsis/Docs/nsExec/nsExec.txt
new file mode 100644
index 0000000..8606986
--- /dev/null
+++ b/KattekerCreator/nsis/Docs/nsExec/nsExec.txt
@@ -0,0 +1,53 @@
+nsExec
+------
+nsExec will execute command-line based programs and capture the output
+without opening a dos box.
+
+
+Usage
+-----
+nsExec::Exec [/OEM] [/TIMEOUT=x] path
+Pop $0
+
+-or-
+
+nsExec::ExecToLog [/OEM] [/TIMEOUT=x] path
+Pop $0
+
+-or-
+
+nsExec::ExecToStack [/OEM] [/TIMEOUT=x] path
+Pop $0 ; Return
+Pop $1 ; Output
+
+All functions are the same except ExecToLog will print the output
+to the log window and ExecToStack will push up to ${NSIS_MAX_STRLEN}
+characters of output onto the stack after the return value.
+
+Use the /OEM switch to convert the output text from OEM to ANSI.
+
+The timeout value is optional. The timeout is the time in
+milliseconds nsExec will wait for output. If output from the
+process is received, the timeout value is reset and it will
+again wait for more output using the timeout value. See Return
+Value for how to check if there was a timeout.
+
+To ensure that command are executed without problems on all windows versions,
+is recommended to use the following syntax:
+
+ nsExec::ExecToStack [OPTIONS] '"PATH" param1 param2 paramN'
+
+This way the application path may contain non 8.3 paths (with spaces)
+
+Return Value
+------------
+If nsExec is unable to execute the process, it will return "error"
+on the top of the stack, if the process timed out it will return
+"timeout", else it will return the return code from the
+executed process.
+
+
+Copyright Info
+--------------
+Copyright (c) 2002 Robert Rainwater
+Thanks to Justin Frankel and Amir Szekely
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/AdvSplash/Example.nsi b/KattekerCreator/nsis/Examples/AdvSplash/Example.nsi
new file mode 100644
index 0000000..751c836
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/AdvSplash/Example.nsi
@@ -0,0 +1,35 @@
+Name "AdvSplash.dll test"
+
+OutFile "AdvSplash Test.exe"
+
+XPStyle on
+
+Function .onInit
+ # the plugins dir is automatically deleted when the installer exits
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
+ #optional
+ #File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav"
+
+ MessageBox MB_OK "Fading"
+
+ advsplash::show 1000 600 400 -1 $PLUGINSDIR\splash
+
+ Pop $0 ; $0 has '1' if the user closed the splash screen early,
+ ; '0' if everything closed normally, and '-1' if some error occurred.
+
+ MessageBox MB_OK "Transparency"
+ File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp"
+ advsplash::show 2000 0 0 0x1856B1 $PLUGINSDIR\splash
+ Pop $0
+
+ MessageBox MB_OK "Transparency/Fading"
+ File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp"
+ advsplash::show 1000 600 400 0x04025C $PLUGINSDIR\splash
+ Pop $0
+
+ Delete $PLUGINSDIR\splash.bmp
+FunctionEnd
+
+Section
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/Banner/Example.nsi b/KattekerCreator/nsis/Examples/Banner/Example.nsi
new file mode 100644
index 0000000..2a98e87
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Banner/Example.nsi
@@ -0,0 +1,38 @@
+# Look at Readme.txt for usage alongside with the Modern UI
+
+!include "WinMessages.nsh"
+
+Name "Banner.dll test"
+
+OutFile "Banner Test.exe"
+
+ShowInstDetails show
+
+Function .onInit
+ Banner::show "Calculating important stuff..."
+
+ Banner::getWindow
+ Pop $1
+
+ again:
+ IntOp $0 $0 + 1
+ Sleep 1
+ StrCmp $0 100 0 again
+
+ GetDlgItem $2 $1 1030
+ SendMessage $2 ${WM_SETTEXT} 0 "STR:Calculating more important stuff..."
+
+ again2:
+ IntOp $0 $0 + 1
+ Sleep 1
+ StrCmp $0 200 0 again2
+
+ Banner::destroy
+FunctionEnd
+
+Section
+ DetailPrint "Using previous calculations to quickly calculate 1*2000..."
+ Sleep 1000
+ DetailPrint "Eureka! It's $0!!!"
+ DetailPrint ""
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/BgImage/Example.nsi b/KattekerCreator/nsis/Examples/BgImage/Example.nsi
new file mode 100644
index 0000000..a0dc2ce
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/BgImage/Example.nsi
@@ -0,0 +1,101 @@
+Name "BgImage.dll test"
+
+OutFile "BgImage Test.exe"
+
+XPStyle on
+RequestExecutionLevel user
+
+!define DEBUG
+!macro GetReturnValue
+!ifdef DEBUG
+ Pop $R9
+ StrCmp $R9 success +2
+ DetailPrint "Error: $R9"
+!endif
+!macroend
+
+Function .onGUIInit
+ # the plugins dir is automatically deleted when the installer exits
+ InitPluginsDir
+ # lets extract some bitmaps...
+ File /oname=$PLUGINSDIR\1.bmp "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp"
+ File /oname=$PLUGINSDIR\2.bmp "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
+
+!ifdef DEBUG
+ # turn return values on if in debug mode
+ BgImage::SetReturn on
+!endif
+
+ # set the initial background for images to be drawn on
+ # we will use a gradient from drak green to dark red
+ BgImage::SetBg /GRADIENT 0 0x80 0 0x80 0 0
+ !insertmacro GetReturnValue
+ # add an image @ (150,0)
+ BgImage::AddImage $PLUGINSDIR\2.bmp 150 0
+ !insertmacro GetReturnValue
+ # add the same image only transparent (magenta wiped) @ (150,16)
+ BgImage::AddImage /TRANSPARENT 255 0 255 $PLUGINSDIR\2.bmp 150 16
+ !insertmacro GetReturnValue
+ # create the font for the following text
+ CreateFont $R0 "Comic Sans MS" 50 700
+ # add a blue shadow for the text
+ BgImage::AddText "Testing 1... 2... 3..." $R0 0 0 255 48 48 798 198
+ !insertmacro GetReturnValue
+ # add a green shadow for the text
+ BgImage::AddText "Testing 1... 2... 3..." $R0 0 255 0 52 52 802 202
+ !insertmacro GetReturnValue
+ # add the text
+ BgImage::AddText "Testing 1... 2... 3..." $R0 255 0 0 50 50 800 200
+ !insertmacro GetReturnValue
+ # show our creation to the world!
+ BgImage::Redraw
+ # Refresh doesn't return any value
+
+FunctionEnd
+
+ShowInstDetails show
+
+Section
+ # play some sounds
+ FindFirst $0 $1 $WINDIR\Media\*.wav
+ StrCmp $0 "" skipSound
+ moreSounds:
+ StrCmp $1 "" noMoreSounds
+ BgImage::Sound /WAIT $WINDIR\Media\$1
+ # Sound doesn't return any value either
+ MessageBox MB_YESNO "Another sound?" IDNO noMoreSounds
+ FindNext $0 $1
+ Goto moreSounds
+
+ noMoreSounds:
+ FindClose $0
+ skipSound:
+
+ # change the background image to Mike, tiled
+ BgImage::SetBg /TILED $PLUGINSDIR\1.bmp
+ !insertmacro GetReturnValue
+ # we have to redraw to reflect the changes
+ BgImage::Redraw
+
+ MessageBox MB_OK "Mike the llama"
+
+ # clear everything
+ BgImage::Clear
+ # Clear doesn't return any value
+ # set another gradient
+ BgImage::SetBg /GRADIENT 0xFF 0xFA 0xBA 0xAA 0xA5 0x65
+ !insertmacro GetReturnValue
+ # add some text
+ BgImage::AddText "A Desert for Mike" $R0 0 0 0 50 50 800 150
+ !insertmacro GetReturnValue
+ # add mike as an image
+ BgImage::AddImage $PLUGINSDIR\1.bmp 50 150
+ !insertmacro GetReturnValue
+ # again, we have to call redraw to reflect changes
+ BgImage::Redraw
+SectionEnd
+
+Function .onGUIEnd
+ BgImage::Destroy
+ # Destroy doesn't return any value
+FunctionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/FileFunc.ini b/KattekerCreator/nsis/Examples/FileFunc.ini
new file mode 100644
index 0000000..5b227f4
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/FileFunc.ini
@@ -0,0 +1,91 @@
+[Settings]
+NumFields=11
+NextButtonText=&Enter
+
+[Field 1]
+Type=Droplist
+Flags=NOTIFY
+State=" 1. Locate"
+ListItems=| 1. Locate| 2. GetSize (file)| (directory)| (no size, no subdir)| 3. DriveSpace| 4. GetDrives (by type)| (all by letter)| 5. GetTime (local time)| (file time)| 6. GetFileAttributes| 7. GetFileVersion| 8. GetExeName| 9. GetExePath|10. GetParameters|11. GetOptions|12. GetRoot|13. GetParent|14. GetFileName|15. GetBaseName|16. GetFileExt|17. BannerTrimPath|18. DirState|19. RefreshShellIcons
+Left=44
+Right=190
+Top=1
+Bottom=210
+
+[Field 2]
+Type=FileRequest
+Left=44
+Right=-10
+Top=22
+Bottom=33
+
+[Field 3]
+Type=DirRequest
+Left=44
+Right=-10
+Top=22
+Bottom=33
+
+[Field 4]
+Type=Text
+Left=44
+Right=-10
+Top=36
+Bottom=49
+
+[Field 5]
+Type=Text
+State=LocateCallback
+Left=44
+Right=232
+Top=53
+Bottom=66
+
+[Field 6]
+Type=Button
+Text=view
+Flags=NOTIFY
+Left=236
+Right=255
+Top=54
+Bottom=65
+
+[Field 7]
+Type=Text
+Flags=MULTILINE|VSCROLL|HSCROLL|READONLY
+Left=44
+Right=-10
+Top=73
+Bottom=128
+
+[Field 8]
+Type=Label
+Text=Path
+Left=10
+Right=43
+Top=24
+Bottom=36
+
+[Field 9]
+Type=Label
+Text=Options
+Left=10
+Right=43
+Top=40
+Bottom=52
+
+[Field 10]
+Type=Label
+Text=Function
+Left=10
+Right=44
+Top=56
+Bottom=67
+
+[Field 11]
+Type=Label
+Text=Result:
+Left=12
+Right=42
+Top=94
+Bottom=102
diff --git a/KattekerCreator/nsis/Examples/FileFunc.nsi b/KattekerCreator/nsis/Examples/FileFunc.nsi
new file mode 100644
index 0000000..f109ec7
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/FileFunc.nsi
@@ -0,0 +1,732 @@
+;_____________________________________________________________________________
+;
+; File Functions
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "File Functions"
+OutFile "FileFunc.exe"
+Caption "$(^Name)"
+XPStyle on
+RequestExecutionLevel user
+
+!include "WinMessages.nsh"
+!include "FileFunc.nsh"
+
+Var INI
+Var HWND
+Var STATE
+Var FUNCTION
+Var LOCATE1
+Var LOCATE2
+Var GETSIZE1
+Var GETSIZE2
+Var GETSIZE3
+Var GETSIZE4
+Var GETSIZE5
+Var GETSIZE6
+Var DRIVESPACE1
+Var DRIVESPACE2
+Var GETDRIVES1
+Var GETTIME1
+Var GETTIME2
+Var GETFILEATTRIBUTES1
+Var GETFILEATTRIBUTES2
+Var GETFILEVERSION1
+Var GETOPTIONS1
+Var GETOPTIONS2
+Var GETROOT1
+Var GETPARENT1
+Var GETFILENAME1
+Var GETBASENAME1
+Var GETFILEEXT1
+Var BANNERTRIMPATH1
+Var BANNERTRIMPATH2
+Var DIRSTATE1
+
+Page Custom ShowCustom LeaveCustom
+
+Function ShowCustom
+ InstallOptions::initDialog "$INI"
+ Pop $hwnd
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1206
+ EnableWindow $1 0
+ SendMessage $1 ${WM_ENABLE} 1 0
+ StrCpy $LOCATE1 $DOCUMENTS
+ StrCpy $LOCATE2 '/L=FD /M=*.* /S=0B /G=1 /B=0'
+ StrCpy $GETSIZE1 '$WINDIR'
+ StrCpy $GETSIZE2 '/M=Explorer.exe /S=0K /G=0'
+ StrCpy $GETSIZE3 '$PROGRAMFILES\Common Files'
+ StrCpy $GETSIZE4 '/S=0M'
+ StrCpy $GETSIZE5 '$WINDIR'
+ StrCpy $GETSIZE6 '/G=0'
+ StrCpy $DRIVESPACE1 'C:\'
+ StrCpy $DRIVESPACE2 '/D=F /S=M'
+ StrCpy $GETDRIVES1 'FDD+CDROM'
+ StrCpy $GETTIME1 '$WINDIR\Explorer.exe'
+ StrCpy $GETTIME2 'C'
+ StrCpy $GETFILEATTRIBUTES1 'C:\IO.SYS'
+ StrCpy $GETFILEATTRIBUTES2 'ALL'
+ StrCpy $GETFILEVERSION1 '$WINDIR\Explorer.exe'
+ StrCpy $GETOPTIONS1 '/SILENT=yes /INSTDIR="$PROGRAMFILES\Common Files"'
+ StrCpy $GETOPTIONS2 '/INSTDIR='
+ StrCpy $GETROOT1 'C:\path\file.dll'
+ StrCpy $GETPARENT1 'C:\path\file.dll'
+ StrCpy $GETFILENAME1 'C:\path\file.dll'
+ StrCpy $GETBASENAME1 'C:\path\file.dll'
+ StrCpy $GETFILEEXT1 'C:\path\file.dll'
+ StrCpy $BANNERTRIMPATH1 'C:\Server\Documents\Terminal\license.htm'
+ StrCpy $BANNERTRIMPATH2 '34A'
+ StrCpy $DIRSTATE1 '$TEMP'
+
+ GetDlgItem $1 $HWND 1203
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$LOCATE1"
+ GetDlgItem $1 $HWND 1205
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$LOCATE2"
+ InstallOptions::show
+ Pop $0
+FunctionEnd
+
+Function LeaveCustom
+ ReadINIStr $STATE $INI "Field 1" "State"
+ ReadINIStr $R1 $INI "Field 2" "State"
+ ReadINIStr $R2 $INI "Field 3" "State"
+ ReadINIStr $R3 $INI "Field 4" "State"
+ ReadINIStr $R4 $INI "Field 5" "State"
+ ReadINIStr $0 $INI "Settings" "State"
+ StrCmp $0 6 view
+ StrCmp $0 0 Enter
+ goto main
+
+ view:
+ StrCpy $0 '$$'
+ StrCpy $1 'n'
+ StrCpy $2 'r'
+ StrCmp $R4 "LocateCallback" 0 +3
+ StrCpy $R0 `Function LocateCallback$\r$\n MessageBox MB_OKCANCEL '$0$$R9 "path\name"=[$$R9]$0\$1$0$$R8 "path" =[$$R8]$0\$1$0$$R7 "name" =[$$R7]$0\$1$0$$R6 "size" =[$$R6]' IDOK +2$\r$\n StrCpy $$R0 StopLocate$\r$\n$\r$\n Push $$R0$\r$\nFunctionEnd`
+ goto send
+ StrCmp $R4 "GetDrivesCallback" 0 error
+ StrCpy $R0 `Function GetDrivesCallback$\r$\n MessageBox MB_OKCANCEL '$0$$9 "drive letter"=[$$9]$0\$1$0$$8 "drive type" =[$$8]' IDOK +2$\r$\n StrCpy $$R0 StopGetDrives$\r$\n StrCpy $$R5 '$$R5$$9 [$$8 Drive]$$\$2$$\$1'$\r$\n$\r$\n Push $$R0$\r$\nFunctionEnd`
+ goto send
+
+ main:
+ StrCmp $FUNCTION '' DefaultSend
+ StrCmp $FUNCTION Locate 0 +4
+ StrCpy $LOCATE1 $R2
+ StrCpy $LOCATE2 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION GetSize1 0 +4
+ StrCpy $GETSIZE1 $R2
+ StrCpy $GETSIZE2 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION GetSize2 0 +4
+ StrCpy $GETSIZE3 $R2
+ StrCpy $GETSIZE4 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION GetSize3 0 +4
+ StrCpy $GETSIZE5 $R2
+ StrCpy $GETSIZE6 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION DriveSpace 0 +4
+ StrCpy $DRIVESPACE1 $R1
+ StrCpy $DRIVESPACE2 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION GetDrives 0 +3
+ StrCpy $GETDRIVES1 $R1
+ goto DefaultSend
+ StrCmp $FUNCTION GetTime 0 +4
+ StrCpy $GETTIME1 $R1
+ StrCpy $GETTIME2 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION GetFileAttributes 0 +4
+ StrCpy $GETFILEATTRIBUTES1 $R1
+ StrCpy $GETFILEATTRIBUTES2 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION GetFileVersion 0 +3
+ StrCpy $GETFILEVERSION1 $R1
+ goto DefaultSend
+ StrCmp $FUNCTION GetOptions 0 +4
+ StrCpy $GETOPTIONS1 $R1
+ StrCpy $GETOPTIONS2 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION GetRoot 0 +3
+ StrCpy $GETROOT1 $R1
+ goto DefaultSend
+ StrCmp $FUNCTION GetParent 0 +3
+ StrCpy $GETPARENT1 $R1
+ goto DefaultSend
+ StrCmp $FUNCTION GetFileName 0 +3
+ StrCpy $GETFILENAME1 $R1
+ goto DefaultSend
+ StrCmp $FUNCTION GetBaseName 0 +3
+ StrCpy $GETBASENAME1 $R1
+ goto DefaultSend
+ StrCmp $FUNCTION GetFileExt 0 +3
+ StrCpy $GETFILEEXT1 $R1
+ goto DefaultSend
+ StrCmp $FUNCTION BannerTrimPath 0 +4
+ StrCpy $BANNERTRIMPATH1 $R1
+ StrCpy $BANNERTRIMPATH2 $R3
+ goto DefaultSend
+ StrCmp $FUNCTION DirState 0 +2
+ StrCpy $DIRSTATE1 $R2
+
+ DefaultSend:
+ GetDlgItem $1 $HWND 1201
+ EnableWindow $1 1
+ ShowWindow $1 0
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1202
+ EnableWindow $1 1
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1203
+ EnableWindow $1 1
+ ShowWindow $1 0
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1204
+ EnableWindow $1 1
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1205
+ EnableWindow $1 1
+ GetDlgItem $1 $HWND 1206
+ ShowWindow $1 0
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1207
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+
+ ReadINIStr $0 $INI "Field 1" "State"
+ StrCmp $0 " 1. Locate" 0 GetSize1Send
+ StrCpy $FUNCTION Locate
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$LOCATE1"
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$LOCATE2"
+ GetDlgItem $1 $HWND 1206
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:LocateCallback"
+ GetDlgItem $1 $HWND 1207
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Path"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Options"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Function"
+ abort
+
+ GetSize1Send:
+ StrCmp $0 " 2. GetSize (file)" 0 GetSize2Send
+ StrCpy $FUNCTION 'GetSize1'
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETSIZE1"
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETSIZE2"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:File"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Options"
+ Abort
+
+ GetSize2Send:
+ StrCmp $0 " (directory)" 0 GetSize3Send
+ StrCpy $FUNCTION 'GetSize2'
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETSIZE3"
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETSIZE4"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Directory"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Options"
+ Abort
+
+ GetSize3Send:
+ StrCmp $0 " (no size, no subdir)" 0 DriveSpaceSend
+ StrCpy $FUNCTION 'GetSize3'
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETSIZE5"
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETSIZE6"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Directory"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Options"
+ Abort
+
+ DriveSpaceSend:
+ StrCmp $0 " 3. DriveSpace" 0 GetDrivesSend
+ StrCpy $FUNCTION DriveSpace
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$DRIVESPACE1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$DRIVESPACE2"
+ GetDlgItem $1 $HWND 1206
+ ShowWindow $1 0
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1207
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Drive"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Options"
+ abort
+
+ GetDrivesSend:
+ StrCmp $0 " 4. GetDrives (by type)" 0 GetDrives2Send
+ StrCpy $FUNCTION GetDrives
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETDRIVES1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1206
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:GetDrivesCallback"
+ GetDlgItem $1 $HWND 1207
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Function"
+ abort
+
+ GetDrives2Send:
+ StrCmp $0 " (all by letter)" 0 GetTime1Send
+ StrCpy $FUNCTION ''
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ EnableWindow $1 0
+ SendMessage $1 ${WM_ENABLE} 1 0
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:ALL"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1206
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:GetDrivesCallback"
+ GetDlgItem $1 $HWND 1207
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Function"
+ abort
+
+ GetTime1Send:
+ StrCmp $0 " 5. GetTime (local time)" 0 GetTime2Send
+ StrCpy $FUNCTION ''
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ EnableWindow $1 0
+ SendMessage $1 ${WM_ENABLE} 1 0
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ EnableWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:L"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ Abort
+
+ GetTime2Send:
+ StrCmp $0 " (file time)" 0 GetFileAttributesSend
+ StrCpy $FUNCTION GetTime
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETTIME1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETTIME2"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:File"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ Abort
+
+ GetFileAttributesSend:
+ StrCmp $0 " 6. GetFileAttributes" 0 GetFileVersionSend
+ StrCpy $FUNCTION GetFileAttributes
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETFILEATTRIBUTES1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETFILEATTRIBUTES2"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Path"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Attrib"
+ Abort
+
+ GetFileVersionSend:
+ StrCmp $0 " 7. GetFileVersion" 0 GetCmdSend
+ StrCpy $FUNCTION GetFileVersion
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETFILEVERSION1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:File"
+ Abort
+
+ GetCmdSend:
+ StrCmp $0 " 8. GetExeName" +3
+ StrCmp $0 " 9. GetExePath" +2
+ StrCmp $0 "10. GetParameters" 0 GetOptionsSend
+ StrCpy $FUNCTION ''
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ Abort
+
+ GetOptionsSend:
+ StrCmp $0 "11. GetOptions" 0 GetRootSend
+ StrCpy $FUNCTION GetOptions
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETOPTIONS1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETOPTIONS2"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Parameters"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ Abort
+
+ GetRootSend:
+ StrCmp $0 "12. GetRoot" 0 GetParentSend
+ StrCpy $FUNCTION GetRoot
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETROOT1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:FullPath"
+ Abort
+
+ GetParentSend:
+ StrCmp $0 "13. GetParent" 0 GetFileNameSend
+ StrCpy $FUNCTION GetParent
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETPARENT1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:PathString"
+ Abort
+
+ GetFileNameSend:
+ StrCmp $0 "14. GetFileName" 0 GetBaseNameSend
+ StrCpy $FUNCTION GetFileName
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETFILENAME1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:PathString"
+ Abort
+
+ GetBaseNameSend:
+ StrCmp $0 "15. GetBaseName" 0 GetFileExtSend
+ StrCpy $FUNCTION GetBaseName
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETBASENAME1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:FileString"
+ Abort
+
+ GetFileExtSend:
+ StrCmp $0 "16. GetFileExt" 0 BannerTrimPathSend
+ StrCpy $FUNCTION GetFileExt
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$GETFILEEXT1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:FileString"
+ Abort
+
+ BannerTrimPathSend:
+ StrCmp $0 "17. BannerTrimPath" 0 DirStateSend
+ StrCpy $FUNCTION BannerTrimPath
+ GetDlgItem $1 $HWND 1201
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$BANNERTRIMPATH1"
+ GetDlgItem $1 $HWND 1202
+ ShowWindow $1 1
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$BANNERTRIMPATH2"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:PathString"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ Abort
+
+ DirStateSend:
+ StrCmp $0 "18. DirState" 0 RefreshShellIconsSend
+ StrCpy $FUNCTION DirState
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$DIRSTATE1"
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Directory"
+ Abort
+
+ RefreshShellIconsSend:
+ StrCmp $0 "19. RefreshShellIcons" 0 Abort
+ StrCpy $FUNCTION ''
+ GetDlgItem $1 $HWND 1205
+ ShowWindow $1 0
+
+ Abort:
+ Abort
+
+;=Enter=
+ Enter:
+ StrCpy $R0 ''
+ StrCpy $R5 ''
+
+ StrCmp $STATE " 1. Locate" Locate
+ StrCmp $STATE " 2. GetSize (file)" GetSize
+ StrCmp $STATE " (directory)" GetSize
+ StrCmp $STATE " (no size, no subdir)" GetSize
+ StrCmp $STATE " 3. DriveSpace" DriveSpace
+ StrCmp $STATE " 4. GetDrives (by type)" GetDrives
+ StrCmp $STATE " (all by letter)" GetDrives
+ StrCmp $STATE " 5. GetTime (local time)" GetTime
+ StrCmp $STATE " (file time)" GetTime
+ StrCmp $STATE " 6. GetFileAttributes" GetFileAttributes
+ StrCmp $STATE " 7. GetFileVersion" GetFileVersion
+ StrCmp $STATE " 8. GetExeName" GetExeName
+ StrCmp $STATE " 9. GetExePath" GetExePath
+ StrCmp $STATE "10. GetParameters" GetParameters
+ StrCmp $STATE "11. GetOptions" GetOptions
+ StrCmp $STATE "12. GetRoot" GetRoot
+ StrCmp $STATE "13. GetParent" GetParent
+ StrCmp $STATE "14. GetFileName" GetFileName
+ StrCmp $STATE "15. GetBaseName" GetBaseName
+ StrCmp $STATE "16. GetFileExt" GetFileExt
+ StrCmp $STATE "17. BannerTrimPath" BannerTrimPath
+ StrCmp $STATE "18. DirState" DirState
+ StrCmp $STATE "19. RefreshShellIcons" RefreshShellIcons
+ Abort
+
+ Locate:
+ ${Locate} "$R2" "$R3" "LocateCallback"
+ IfErrors error
+ StrCmp $R0 StopLocate 0 +3
+ StrCpy $R0 'stopped'
+ goto send
+ StrCpy $R0 'done'
+ goto send
+
+ GetSize:
+ ${GetSize} "$R2" "$R3" $0 $1 $2
+ IfErrors error
+ StrCpy $R0 "Size=$0$\r$\nFiles=$1$\r$\nFolders=$2"
+ goto send
+
+ DriveSpace:
+ ${DriveSpace} "$R1" "$R3" $0
+ IfErrors error
+ StrCpy $R0 "$0"
+ goto send
+
+ GetDrives:
+ ${GetDrives} "$R1" "GetDrivesCallback"
+ StrCmp $R0 StopGetDrives 0 +3
+ StrCpy $R0 '$R5stopped'
+ goto send
+ StrCpy $R0 '$R5done'
+ goto send
+
+ GetTime:
+ ${GetTime} "$R1" "$R3" $0 $1 $2 $3 $4 $5 $6
+ IfErrors error
+ StrCpy $R0 'Date=$0/$1/$2 ($3)$\r$\nTime=$4:$5:$6'
+ goto send
+
+ GetFileAttributes:
+ ${GetFileAttributes} "$R1" "$R3" $0
+ IfErrors error
+ StrCpy $R0 '$0'
+ goto send
+
+ GetFileVersion:
+ ${GetFileVersion} "$R1" $0
+ IfErrors error
+ StrCpy $R0 '$0'
+ goto send
+
+ GetExeName:
+ ${GetExeName} $0
+ StrCpy $R0 '$0'
+ goto send
+
+ GetExePath:
+ ${GetExePath} $0
+ StrCpy $R0 '$0'
+ goto send
+
+ GetParameters:
+ ${GetParameters} $0
+ StrCpy $R0 '$0'
+ StrCmp $R0 '' 0 send
+ StrCpy $R0 'no parameters'
+ goto send
+
+ GetOptions:
+ ${GetOptions} "$R1" "$R3" $0
+ IfErrors error
+ StrCpy $R0 '$0'
+ goto send
+
+ GetRoot:
+ ${GetRoot} "$R1" $0
+ StrCpy $R0 '$0'
+ goto send
+
+ GetParent:
+ ${GetParent} "$R1" $0
+ StrCpy $R0 '$0'
+ goto send
+
+ GetFileName:
+ ${GetFileName} "$R1" $0
+ StrCpy $R0 '$0'
+ goto send
+
+ GetBaseName:
+ ${GetBaseName} "$R1" $0
+ StrCpy $R0 '$0'
+ goto send
+
+ GetFileExt:
+ ${GetFileExt} "$R1" $0
+ StrCpy $R0 '$0'
+ goto send
+
+ BannerTrimPath:
+ ${BannerTrimPath} "$R1" "$R3" $0
+ StrCpy $R0 '$0'
+ goto send
+
+ DirState:
+ ${DirState} "$R2" $0
+ StrCpy $R0 '$0'
+ goto send
+
+ RefreshShellIcons:
+ ${RefreshShellIcons}
+ StrCpy $R0 'done'
+ goto send
+
+ error:
+ StrCpy $R0 'error'
+
+ send:
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$R0"
+
+ abort
+FunctionEnd
+
+Function LocateCallback
+ MessageBox MB_OKCANCEL '$$R9 "path\name"=[$R9]$\n$$R8 "path" =[$R8]$\n$$R7 "name" =[$R7]$\n$$R6 "size" =[$R6]' IDOK +2
+ StrCpy $R0 StopLocate
+
+ Push $R0
+FunctionEnd
+
+Function GetDrivesCallback
+ MessageBox MB_OKCANCEL '$$9 "drive letter"=[$9]$\n$$8 "drive type" =[$8]' IDOK +2
+ StrCpy $R0 StopGetDrives
+ StrCpy $R5 '$R5$9 [$8 Drive]$\r$\n'
+
+ Push $R0
+FunctionEnd
+
+Function .onInit
+ InitPluginsDir
+ GetTempFileName $INI $PLUGINSDIR
+ File /oname=$INI "FileFunc.ini"
+FunctionEnd
+
+Page instfiles
+
+Section "Empty"
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/FileFuncTest.nsi b/KattekerCreator/nsis/Examples/FileFuncTest.nsi
new file mode 100644
index 0000000..0a2db35
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/FileFuncTest.nsi
@@ -0,0 +1,572 @@
+;_____________________________________________________________________________
+;
+; File Functions Test
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "File Functions Test"
+OutFile "FileFuncTest.exe"
+Caption "$(^Name)"
+ShowInstDetails show
+XPStyle on
+RequestExecutionLevel user
+
+Var FUNCTION
+Var OUT1
+Var OUT2
+Var OUT3
+Var OUT4
+Var OUT5
+Var OUT6
+Var OUT7
+
+!include "FileFunc.nsh"
+!include "LogicLib.nsh"
+
+;############### INSTALL ###############
+
+!define StackVerificationStart `!insertmacro StackVerificationStart`
+!macro StackVerificationStart _FUNCTION
+ StrCpy $FUNCTION ${_FUNCTION}
+ Call StackVerificationStart
+!macroend
+
+!define StackVerificationEnd `!insertmacro StackVerificationEnd`
+!macro StackVerificationEnd
+ Call StackVerificationEnd
+!macroend
+
+Function StackVerificationStart
+ StrCpy $0 !0
+ StrCpy $1 !1
+ StrCpy $2 !2
+ StrCpy $3 !3
+ StrCpy $4 !4
+ StrCpy $5 !5
+ StrCpy $6 !6
+ StrCpy $7 !7
+ StrCpy $8 !8
+ StrCpy $9 !9
+ StrCpy $R0 !R0
+ StrCpy $R1 !R1
+ StrCpy $R2 !R2
+ StrCpy $R3 !R3
+ StrCpy $R4 !R4
+ StrCpy $R5 !R5
+ StrCpy $R6 !R6
+ StrCpy $R7 !R7
+ StrCpy $R8 !R8
+ StrCpy $R9 !R9
+FunctionEnd
+
+Function StackVerificationEnd
+ IfErrors +3
+ DetailPrint 'PASSED $FUNCTION no errors'
+ goto +2
+ DetailPrint 'FAILED $FUNCTION error'
+
+ StrCmp $0 '!0' 0 error
+ StrCmp $1 '!1' 0 error
+ StrCmp $2 '!2' 0 error
+ StrCmp $3 '!3' 0 error
+ StrCmp $4 '!4' 0 error
+ StrCmp $5 '!5' 0 error
+ StrCmp $6 '!6' 0 error
+ StrCmp $7 '!7' 0 error
+ StrCmp $8 '!8' 0 error
+ StrCmp $9 '!9' 0 error
+ StrCmp $R0 '!R0' 0 error
+ StrCmp $R1 '!R1' 0 error
+ StrCmp $R2 '!R2' 0 error
+ StrCmp $R3 '!R3' 0 error
+ StrCmp $R4 '!R4' 0 error
+ StrCmp $R5 '!R5' 0 error
+ StrCmp $R6 '!R6' 0 error
+ StrCmp $R7 '!R7' 0 error
+ StrCmp $R8 '!R8' 0 error
+ StrCmp $R9 '!R9' 0 error
+ DetailPrint 'PASSED $FUNCTION stack'
+ goto end
+
+ error:
+ DetailPrint 'FAILED $FUNCTION stack'
+; MessageBox MB_OKCANCEL '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}' IDOK +2
+; quit
+
+ end:
+FunctionEnd
+
+
+
+Section Locate
+ ${StackVerificationStart} Locate
+
+ ${Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'LocateCallback'
+
+ ${StackVerificationEnd}
+SectionEnd
+
+Function LocateCallback
+; MessageBox MB_YESNO '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}$\n$\nContinue?' IDYES +2
+; StrCpy $0 StopLocate
+
+ Push $0
+FunctionEnd
+
+
+Section GetSize
+ ${StackVerificationStart} GetSize
+
+ ${GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section DriveSpace
+ ${StackVerificationStart} DriveSpace
+
+ ${DriveSpace} 'C:\' '/D=F /S=M' $OUT1
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetDrives
+ ${StackVerificationStart} GetDrives
+
+ ${GetDrives} 'FDD+CDROM' 'GetDrivesCallback'
+
+ ${StackVerificationEnd}
+SectionEnd
+
+Function GetDrivesCallback
+; MessageBox MB_YESNO '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}$\n$\nContinue?' IDYES +2
+; StrCpy $0 StopGetDrives
+
+ Push $0
+FunctionEnd
+
+
+Section GetTime
+ ${StackVerificationStart} GetTime
+
+ ${GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetFileAttributes
+ ${StackVerificationStart} GetFileAttributes
+
+ ${GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetFileVersion
+ ${StackVerificationStart} GetFileVersion
+
+ ${GetFileVersion} '$WINDIR\explorer.exe' $OUT1
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetExeName
+ ${StackVerificationStart} GetExeName
+
+ ${GetExeName} $OUT1
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetExePath
+ ${StackVerificationStart} GetExePath
+
+ ${GetExePath} $OUT1
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetParameters
+ ${StackVerificationStart} GetParameters
+
+ # basic stuff
+
+ StrCpy $CMDLINE '"$PROGRAMFILES\Something\Hello.exe"'
+ ${GetParameters} $OUT1
+ StrCpy $CMDLINE '"$PROGRAMFILES\Something\Hello.exe" test'
+ ${GetParameters} $OUT2
+ StrCpy $CMDLINE '"$PROGRAMFILES\Something\Hello.exe" "test"'
+ ${GetParameters} $OUT3
+ StrCpy $CMDLINE 'C:\Hello.exe'
+ ${GetParameters} $OUT4
+ StrCpy $CMDLINE 'C:\Hello.exe test'
+ ${GetParameters} $OUT5
+ StrCpy $CMDLINE 'C:\Hello.exe "test"'
+ ${GetParameters} $OUT6
+ StrCpy $CMDLINE 'C:\Hello.exe test test '
+ ${GetParameters} $OUT7
+
+ ${If} $OUT1 != ""
+ ${OrIf} $OUT2 != "test"
+ ${OrIf} $OUT3 != '"test"'
+ ${OrIf} $OUT4 != ""
+ ${OrIf} $OUT5 != "test"
+ ${OrIf} $OUT6 != '"test"'
+ ${OrIf} $OUT7 != 'test test'
+ SetErrors
+ ${EndIf}
+
+ # some corner cases
+
+ StrCpy $CMDLINE ''
+ ${GetParameters} $OUT1
+ StrCpy $CMDLINE '"'
+ ${GetParameters} $OUT2
+ StrCpy $CMDLINE '""'
+ ${GetParameters} $OUT3
+ StrCpy $CMDLINE '"" test'
+ ${GetParameters} $OUT4
+ StrCpy $CMDLINE ' test'
+ ${GetParameters} $OUT5
+ StrCpy $CMDLINE ' test' # left over bug(?) from old GetParameters
+ # it starts looking for ' ' from the third char
+ ${GetParameters} $OUT6
+ StrCpy $CMDLINE ' '
+ ${GetParameters} $OUT7
+
+ ${If} $OUT1 != ""
+ ${OrIf} $OUT2 != ""
+ ${OrIf} $OUT3 != ""
+ ${OrIf} $OUT4 != ""
+ ${OrIf} $OUT5 != ""
+ ${OrIf} $OUT6 != ""
+ ${OrIf} $OUT7 != ""
+ SetErrors
+ ${EndIf}
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetOptions
+ ${StackVerificationStart} GetOptions
+
+ ${GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
+ StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
+
+ ${GetOptions} '-TMP=temp.tmp -INSTDIR="C:/Program Files/Common Files" -SILENT=yes' '-INSTDIR=' $OUT1
+ StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
+
+ ${GetOptions} "/INSTDIR='C:/Program Files/Common Files' /SILENT=yes" '/INSTDIR=' $OUT1
+ StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
+
+ StrCpy $OUT1 '/INSTDIR=`C:/Program Files/Common Files` /SILENT=yes'
+ ${GetOptions} '$OUT1' '/INSTDIR=' $OUT1
+ StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
+
+ ${GetOptions} '/SILENT=yes /INSTDIR=C:\Program Files\Common Files' '/INSTDIR=' $OUT1
+ StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
+
+ ${GetOptions} "/INSTDIR=common directory: 'C:\Program Files\Common Files' /SILENT=yes" '/INSTDIR=' $OUT1
+ StrCmp $OUT1 "common directory: 'C:\Program Files\Common Files'" 0 error
+
+ ${GetOptions} '/INSTDIR=WxxxW /SILENT=yes' '/INSTDIR=' $OUT1
+ StrCmp $OUT1 'WxxxW' 0 error
+
+ ${GetOptions} "/Prm='/D=True' /D=1" '/D=' $OUT1
+ StrCmp $OUT1 "1" 0 error
+
+ ${GetOptions} "/D=1 /Prm='/D=True'" '/Prm=' $OUT1
+ StrCmp $OUT1 "/D=True" 0 error
+
+ ${GetOptions} `/D=1 /Prm='/D="True" /S="/Temp"'` '/Prm=' $OUT1
+ StrCmp $OUT1 '/D="True" /S="/Temp"' 0 error
+
+ ${GetOptions} `/INSTDIR='"C:/Program Files/Common Files"' /SILENT=yes` '/INSTDIR=' $OUT1
+ StrCmp $OUT1 '"C:/Program Files/Common Files"' 0 error
+
+ ${GetOptions} `/INSTDIR='"C:/Program Files/Common Files"' /SILENT=yes` '/INSTDIR*=' $OUT1
+ IfErrors 0 error
+ StrCmp $OUT1 '' 0 error
+
+ ${GetOptions} `/INSTDIR="C:/Program Files/Common Files" /SILENT=yes` '' $OUT1
+ IfErrors 0 error
+ StrCmp $OUT1 '' 0 error
+
+ ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT' '/SILENT' $OUT1
+ IfErrors error
+ StrCmp $OUT1 '' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetOptionsS
+ ${StackVerificationStart} GetOptionsS
+
+ ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
+ IfErrors error
+ StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
+
+ ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/Instdir=' $OUT1
+ IfErrors 0 error
+ StrCmp $OUT1 '' 0 error
+
+ ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT' '/SILENT' $OUT1
+ IfErrors error
+ StrCmp $OUT1 '' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetRoot
+ ${StackVerificationStart} GetRoot
+
+ ${GetRoot} 'C:\Program Files\NSIS' $OUT1
+ StrCmp $OUT1 'C:' 0 error
+
+ ${GetRoot} '\\SuperPimp\NSIS\Source\exehead\Ui.c' $OUT1
+ StrCmp $OUT1 '\\SuperPimp\NSIS' 0 error
+
+ ${GetRoot} '\\Program Files\NSIS' $OUT1
+ StrCmp $OUT1 '\\Program Files\NSIS' 0 error
+
+ ${GetRoot} '\\Program Files\NSIS\' $OUT1
+ StrCmp $OUT1 '\\Program Files\NSIS' 0 error
+
+ ${GetRoot} '\\Program Files\NSIS\Source\exehead\Ui.c' $OUT1
+ StrCmp $OUT1 '\\Program Files\NSIS' 0 error
+
+ ${GetRoot} '\Program Files\NSIS' $OUT1
+ StrCmp $OUT1 '' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetParent
+ ${StackVerificationStart} GetParent
+
+ ${GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
+
+ ${GetParent} 'C:\Program Files\Winamp\plugins' $OUT1
+ StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
+
+ ${GetParent} 'C:\Program Files\Winamp\plugins\' $OUT1
+ StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
+
+ ${GetParent} 'C:\' $OUT1
+ StrCmp $OUT1 '' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetFileName
+ ${StackVerificationStart} GetFileName
+
+ ${GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ StrCmp $OUT1 'uninstwa.exe' 0 error
+
+ ${GetFileName} 'uninstwa.exe' $OUT1
+ StrCmp $OUT1 'uninstwa.exe' 0 error
+
+ ${GetFileName} 'C:\Program Files\Winamp\plugins' $OUT1
+ StrCmp $OUT1 'plugins' 0 error
+
+ ${GetFileName} 'C:\Program Files\Winamp\plugins\' $OUT1
+ StrCmp $OUT1 'plugins' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetBaseName
+ ${StackVerificationStart} GetBaseName
+
+ ${GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ StrCmp $OUT1 'uninstwa' 0 error
+
+ ${GetBaseName} 'uninstwa.exe' $OUT1
+ StrCmp $OUT1 'uninstwa' 0 error
+
+ ${GetBaseName} 'C:\Program Files\Winamp\plugins' $OUT1
+ StrCmp $OUT1 'plugins' 0 error
+
+ ${GetBaseName} 'C:\Program Files\Winamp\plugins\' $OUT1
+ StrCmp $OUT1 '' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section GetFileExt
+ ${StackVerificationStart} GetFileExt
+
+ ${GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ StrCmp $OUT1 'exe' 0 error
+
+ ${GetFileExt} 'uninstwa.exe' $OUT1
+ StrCmp $OUT1 'exe' 0 error
+
+ ${GetFileExt} 'C:\Program Files\Winamp\plugins' $OUT1
+ StrCmp $OUT1 '' 0 error
+
+ ${GetFileExt} 'C:\Program Files\Winamp\plugins\' $OUT1
+ StrCmp $OUT1 '' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section BannerTrimPath
+ ${StackVerificationStart} BannerTrimPath
+
+ ${BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
+ StrCmp $OUT1 'C:\Server\...\Terminal\license.htm' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '3A' $OUT1
+ StrCmp $OUT1 '' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '4A' $OUT1
+ StrCmp $OUT1 'C...' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '11A' $OUT1
+ StrCmp $OUT1 'C:\12\...' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '13A' $OUT1
+ StrCmp $OUT1 'C:\12\...\789' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '14A' $OUT1
+ StrCmp $OUT1 'C:\12\3456\789' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '14A' $OUT1
+ StrCmp $OUT1 'C:\12\3456\789' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '11B' $OUT1
+ StrCmp $OUT1 'C:\12\...' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '5B' $OUT1
+ StrCmp $OUT1 'C:...' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '5B' $OUT1
+ StrCmp $OUT1 'C:...' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '11C' $OUT1
+ StrCmp $OUT1 'C:\12\34...' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '9D' $OUT1
+ StrCmp $OUT1 'C:\12\...' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '10D' $OUT1
+ StrCmp $OUT1 'C:\...\789' 0 error
+
+ ${BannerTrimPath} 'C:\12\3456\789' '11D' $OUT1
+ StrCmp $OUT1 'C:\1...\789' 0 error
+
+ ${BannerTrimPath} '123456789' '5D' $OUT1
+ StrCmp $OUT1 '12...' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section DirState
+ ${StackVerificationStart} DirState
+
+ ${DirState} '$TEMP' $OUT1
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section RefreshShellIcons
+ ${StackVerificationStart} RefreshShellIcons
+
+ ${RefreshShellIcons}
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WriteUninstaller
+ goto +2
+ WriteUninstaller '$EXEDIR\un.FileFuncTest.exe'
+SectionEnd
+
+
+
+;############### UNINSTALL ###############
+
+Section un.Uninstall
+ ${Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'un.LocateCallback'
+ ${GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
+ ${DriveSpace} 'C:\' '/D=F /S=M' $OUT1
+ ${GetDrives} 'FDD+CDROM' 'un.GetDrivesCallback'
+ ${GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
+ ${GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
+ ${GetFileVersion} '$WINDIR\explorer.exe' $OUT1
+ ${GetExeName} $OUT1
+ ${GetExePath} $OUT1
+ ${GetParameters} $OUT1
+ ${GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
+ ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
+ ${GetRoot} 'C:\Program Files\NSIS' $OUT1
+ ${GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
+ ${DirState} '$TEMP' $OUT1
+ ${RefreshShellIcons}
+SectionEnd
+
+Function un.LocateCallback
+ Push $0
+FunctionEnd
+
+Function un.GetDrivesCallback
+ Push $0
+FunctionEnd
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/test.ini b/KattekerCreator/nsis/Examples/InstallOptions/test.ini
new file mode 100644
index 0000000..da743e8
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/test.ini
@@ -0,0 +1,76 @@
+[Settings]
+NumFields=8
+
+[Field 1]
+Type=GroupBox
+Left=0
+Right=-1
+Top=0
+Bottom=-5
+Text=" This is a group box... "
+
+[Field 2]
+Type=checkbox
+Text=Install support for X
+Left=10
+Right=-10
+Top=17
+Bottom=25
+State=0
+Flags=GROUP
+
+[Field 3]
+Type=checkbox
+Text=Install support for Y
+Left=10
+Right=-10
+Top=30
+Bottom=38
+State=1
+Flags=NOTABSTOP
+
+[Field 4]
+Type=checkbox
+Text=Install support for Z
+Left=10
+Right=-10
+Top=43
+Bottom=51
+State=0
+Flags=NOTABSTOP
+
+[Field 5]
+Type=FileRequest
+State=C:\dummy.xyz
+Left=10
+Right=-10
+Top=56
+Bottom=68
+Filter=XYZ Files|*.xyz|All files|*.*
+Flags=GROUP|FILE_MUST_EXIST|FILE_EXPLORER|FILE_HIDEREADONLY
+
+[Field 6]
+Type=DirRequest
+Left=10
+Right=-10
+Top=73
+Bottom=85
+Text=Select a directory...
+State=C:\Program Files\NSIS
+
+[Field 7]
+Type=Label
+Left=10
+Right=-10
+Top=90
+Bottom=98
+Text=This is a label...
+
+[Field 8]
+Type=Text
+Left=10
+Right=-10
+Top=98
+Bottom=120
+State="Multiline\r\nedit..."
+Flags=MULTILINE|VSCROLL|WANTRETURN
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/test.nsi b/KattekerCreator/nsis/Examples/InstallOptions/test.nsi
new file mode 100644
index 0000000..30b15c4
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/test.nsi
@@ -0,0 +1,84 @@
+;InstallOptions Test Script
+;Written by Joost Verburg
+;--------------------------
+
+!define TEMP1 $R0 ;Temp variable
+
+;The name of the installer
+Name "InstallOptions Test"
+
+;The file to write
+OutFile "Test.exe"
+
+; Show install details
+ShowInstDetails show
+
+;Things that need to be extracted on startup (keep these lines before any File command!)
+;Only useful for BZIP2 compression
+;Use ReserveFile for your own InstallOptions INI files too!
+
+ReserveFile /plugin InstallOptions.dll
+ReserveFile "test.ini"
+
+;Order of pages
+Page custom SetCustom ValidateCustom ": Testing InstallOptions" ;Custom page. InstallOptions gets called in SetCustom.
+Page instfiles
+
+Section "Components"
+
+ ;Get Install Options dialog user input
+
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 2" "State"
+ DetailPrint "Install X=${TEMP1}"
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 3" "State"
+ DetailPrint "Install Y=${TEMP1}"
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 4" "State"
+ DetailPrint "Install Z=${TEMP1}"
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 5" "State"
+ DetailPrint "File=${TEMP1}"
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 6" "State"
+ DetailPrint "Dir=${TEMP1}"
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 8" "State"
+ DetailPrint "Info=${TEMP1}"
+
+SectionEnd
+
+Function .onInit
+
+ ;Extract InstallOptions files
+ ;$PLUGINSDIR will automatically be removed when the installer closes
+
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\test.ini "test.ini"
+
+FunctionEnd
+
+Function SetCustom
+
+ ;Display the InstallOptions dialog
+
+ Push ${TEMP1}
+
+ InstallOptions::dialog "$PLUGINSDIR\test.ini"
+ Pop ${TEMP1}
+
+ Pop ${TEMP1}
+
+FunctionEnd
+
+Function ValidateCustom
+
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 2" "State"
+ StrCmp ${TEMP1} 1 done
+
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 3" "State"
+ StrCmp ${TEMP1} 1 done
+
+ ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 4" "State"
+ StrCmp ${TEMP1} 1 done
+ MessageBox MB_ICONEXCLAMATION|MB_OK "You must select at least one install option!"
+ Abort
+
+ done:
+
+FunctionEnd
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/testimgs.ini b/KattekerCreator/nsis/Examples/InstallOptions/testimgs.ini
new file mode 100644
index 0000000..381a986
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/testimgs.ini
@@ -0,0 +1,65 @@
+[Settings]
+NumFields=8
+
+[Field 1]
+Type=GroupBox
+Left=0
+Right=-1
+Top=0
+Bottom=-5
+Text=" Images "
+
+[Field 2]
+Type=Bitmap
+Left=10
+Right=-10
+Top=10
+Bottom=30
+Flags=TRANSPARENT
+
+[Field 3]
+Type=Bitmap
+Left=10
+Right=-10
+Top=35
+Bottom=45
+Flags=TRANSPARENT
+
+[Field 4]
+Type=Bitmap
+Left=10
+Right=-10
+Top=50
+Bottom=70
+Flags=RESIZETOFIT|TRANSPARENT
+
+[Field 5]
+Type=Bitmap
+Left=10
+Right=-10
+Top=75
+Bottom=95
+Flags=RESIZETOFIT|TRANSPARENT
+
+[Field 6]
+Type=Icon
+Left=10
+Right=40
+Top=100
+Bottom=120
+
+[Field 7]
+Type=Icon
+Left=50
+Right=80
+Top=100
+Bottom=120
+
+[Field 8]
+Type=Label
+Left=10
+Right=-10
+Top=10
+Bottom=-10
+Text=ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ
+
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/testimgs.nsi b/KattekerCreator/nsis/Examples/InstallOptions/testimgs.nsi
new file mode 100644
index 0000000..3d0f4ec
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/testimgs.nsi
@@ -0,0 +1,59 @@
+;InstallOptions Test Script
+;Written by Joost Verburg
+;--------------------------
+
+;The name of the installer
+Name "InstallOptions Test"
+
+;The file to write
+OutFile "Test.exe"
+
+; Show install details
+ShowInstDetails show
+
+;Things that need to be extracted on startup (keep these lines before any File command!)
+;Only useful for BZIP2 compression
+;Use ReserveFile for your own InstallOptions INI files too!
+
+ReserveFile /plugin InstallOptions.dll
+ReserveFile "testimgs.ini"
+ReserveFile "${NSISDIR}\Contrib\Graphics\Checks\colorful.bmp"
+ReserveFile "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
+ReserveFile "${NSISDIR}\Contrib\Graphics\Icons\pixel-install.ico"
+
+;Order of pages
+Page custom SetCustom "" ": Testing InstallOptions" ;Custom page. InstallOptions gets called in SetCustom.
+Page instfiles
+
+Section
+SectionEnd
+
+Function .onInit
+
+ ;Extract InstallOptions files
+ ;$PLUGINSDIR will automatically be removed when the installer closes
+
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\testimgs.ini "testimgs.ini"
+ File /oname=$PLUGINSDIR\image.bmp "${NSISDIR}\Contrib\Graphics\Checks\colorful.bmp"
+ File /oname=$PLUGINSDIR\image2.bmp "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
+ File /oname=$PLUGINSDIR\icon.ico "${NSISDIR}\Contrib\Graphics\Icons\pixel-install.ico"
+
+ ;Write image paths to the INI file
+
+ WriteINIStr $PLUGINSDIR\testimgs.ini "Field 2" "Text" $PLUGINSDIR\image.bmp
+ WriteINIStr $PLUGINSDIR\testimgs.ini "Field 3" "Text" $PLUGINSDIR\image2.bmp
+ WriteINIStr $PLUGINSDIR\testimgs.ini "Field 4" "Text" $PLUGINSDIR\image.bmp
+ WriteINIStr $PLUGINSDIR\testimgs.ini "Field 5" "Text" $PLUGINSDIR\image2.bmp
+ WriteINIStr $PLUGINSDIR\testimgs.ini "Field 6" "Text" $PLUGINSDIR\icon.ico
+ ;No Text for Field 7 so it'll show the installer's icon
+
+FunctionEnd
+
+Function SetCustom
+
+ ;Display the InstallOptions dialog
+ InstallOptions::dialog "$PLUGINSDIR\testimgs.ini"
+ Pop $0
+
+FunctionEnd
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/testlink.ini b/KattekerCreator/nsis/Examples/InstallOptions/testlink.ini
new file mode 100644
index 0000000..592ae93
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/testlink.ini
@@ -0,0 +1,44 @@
+[Settings]
+NumFields=5
+
+[Field 1]
+Type=Label
+Left=10
+Right=-40
+Top=10
+Bottom=18
+Text=This custom page demonstrates the "Link" control
+
+[Field 2]
+Type=Link
+Left=20
+Right=-40
+Top=40
+Bottom=50
+Text=* Run notepad
+
+[Field 3]
+Type=Link
+Left=20
+Right=-40
+Top=55
+Bottom=65
+State=mailto:someone@anywhere.com
+Text=* Send E-mail
+
+[Field 4]
+Type=Link
+Left=20
+Right=-40
+Top=70
+Bottom=80
+State=http://nsis.sourceforge.net/
+Text=* Homepage http://nsis.sourceforge.net/
+
+[Field 5]
+Type=Text
+Left=20
+Right=-40
+Top=85
+Bottom=98
+State=Just to test proper interaction with the other fields
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/testlink.nsi b/KattekerCreator/nsis/Examples/InstallOptions/testlink.nsi
new file mode 100644
index 0000000..9096590
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/testlink.nsi
@@ -0,0 +1,58 @@
+;InstallOptions Test Script
+;Written by Ramon
+;This script demonstrates the power of the new control "LINK"
+;that allows you to execute files, send mails, open wepsites, etc.
+;--------------------------
+
+!define TEMP1 $R0 ;Temp variable
+
+;The name of the installer
+Name "InstallOptions Test Link"
+
+;The file to write
+OutFile "TestLink.exe"
+
+; Show install details
+ShowInstDetails show
+
+;Things that need to be extracted on startup (keep these lines before any File command!)
+;Only useful for BZIP2 compression
+;Use ReserveFile for your own InstallOptions INI files too!
+
+ReserveFile /plugin InstallOptions.dll
+ReserveFile "testlink.ini"
+
+;Order of pages
+Page custom SetCustom
+Page instfiles
+
+Section "Components"
+
+ ;Get Install Options dialog user input
+
+SectionEnd
+
+Function .onInit
+
+ ;Extract InstallOptions files
+ ;$PLUGINSDIR will automatically be removed when the installer closes
+
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\test.ini "testlink.ini"
+ WriteIniStr $PLUGINSDIR\test.ini "Field 2" "State" "$WINDIR\Notepad.exe"
+
+FunctionEnd
+
+Function SetCustom
+
+ ;Display the InstallOptions dialog
+
+ Push ${TEMP1}
+
+ InstallOptions::dialog "$PLUGINSDIR\test.ini"
+ Pop ${TEMP1}
+
+ Pop ${TEMP1}
+
+FunctionEnd
+
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/testnotify.ini b/KattekerCreator/nsis/Examples/InstallOptions/testnotify.ini
new file mode 100644
index 0000000..956e8cd
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/testnotify.ini
@@ -0,0 +1,105 @@
+[Settings]
+NumFields=11
+
+[Field 1]
+Type=Groupbox
+Text="This is a group box..."
+Left=0
+Right=-1
+Top=0
+Bottom=-4
+
+[Field 2]
+Type=Checkbox
+Text=Install support for X
+Flags=NOTIFY
+State=1
+Left=10
+Right=100
+Top=17
+Bottom=25
+
+[Field 3]
+Type=Checkbox
+Text=Install support for Y
+State=0
+Left=10
+Right=100
+Top=30
+Bottom=38
+
+[Field 4]
+Type=Checkbox
+Text=Install support for Z
+Flags=RIGHT
+State=0
+Left=10
+Right=100
+Top=43
+Bottom=51
+
+[Field 5]
+Type=FileRequest
+Flags=GROUP|FILE_MUST_EXIST|FILE_EXPLORER|FILE_HIDEREADONLY
+State=C:\dummy.xyz
+Filter=XYZ Files|*.xyz|All files|*.*
+Left=10
+Right=-10
+Top=56
+Bottom=69
+
+[Field 6]
+Type=DirRequest
+Text=Select a directory...
+State=C:\Program Files\NSIS
+Left=10
+Right=-10
+Top=74
+Bottom=87
+
+[Field 7]
+Type=Label
+Text=This is a label...
+Left=10
+Right=-10
+Top=89
+Bottom=97
+
+[Field 8]
+Type=Text
+Flags=MULTILINE|VSCROLL|WANTRETURN|NOWORDWRAP
+State="Multiline\r\nedit..."
+Left=10
+Right=-10
+Top=97
+Bottom=118
+MinLen=1
+ValidateText=Please enter some text before proceeding.
+
+[Field 9]
+Type=Button
+Flags=NOTIFY
+Text=&Clear
+Left=-60
+Right=-10
+Top=19
+Bottom=33
+
+[Field 10]
+Type=Button
+Text=&Email
+State=mailto:someone@anywhere.com
+Left=-60
+Right=-10
+Top=35
+Bottom=49
+
+[Field 11]
+Type=DROPLIST
+ListItems=Show|Hide
+State=Show
+Flags=NOTIFY
+Left=120
+Right=-80
+Top=20
+Bottom=56
diff --git a/KattekerCreator/nsis/Examples/InstallOptions/testnotify.nsi b/KattekerCreator/nsis/Examples/InstallOptions/testnotify.nsi
new file mode 100644
index 0000000..a8ab734
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/InstallOptions/testnotify.nsi
@@ -0,0 +1,133 @@
+; InstallOptions script demonstrating custom buttons
+;----------------------------------------------------
+
+!include WinMessages.nsh
+
+; The name of the installer
+Name "InstallOptions Test"
+
+; The file to write
+OutFile "TestNotify.exe"
+
+; Show install details
+ShowInstDetails show
+
+; Called before anything else as installer initialises
+Function .onInit
+
+ ; Extract InstallOptions files
+ ; $PLUGINSDIR will automatically be removed when the installer closes
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\test.ini "testnotify.ini"
+
+FunctionEnd
+
+; Our custom page
+Page custom ShowCustom LeaveCustom ": Testing InstallOptions"
+
+Function ShowCustom
+
+ ; Initialise the dialog but don't show it yet
+ MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Test the right-to-left version?" IDNO +2
+ WriteINIStr "$PLUGINSDIR\test.ini" "Settings" "RTL" "1"
+ InstallOptions::initDialog "$PLUGINSDIR\test.ini"
+ ; In this mode InstallOptions returns the window handle so we can use it
+ Pop $0
+ ; Now show the dialog and wait for it to finish
+ InstallOptions::show
+ ; Finally fetch the InstallOptions status value (we don't care what it is though)
+ Pop $0
+
+FunctionEnd
+
+Function LeaveCustom
+
+ ; At this point the user has either pressed Next or one of our custom buttons
+ ; We find out which by reading from the INI file
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Settings" "State"
+ StrCmp $0 0 validate ; Next button?
+ StrCmp $0 2 supportx ; "Install support for X"?
+ StrCmp $0 9 clearbtn ; "Clear" button?
+ StrCmp $0 11 droplist ; "Show|Hide" drop-list?
+ Abort ; Return to the page
+
+supportx:
+ ; Make the FileRequest field depend on the first checkbox
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 2" "State"
+ ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 5" "HWND"
+ EnableWindow $1 $0
+ ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 5" "HWND2"
+ EnableWindow $1 $0
+ ; Add the disabled flag too so when we return to this page it's disabled again
+ StrCmp $0 0 0 +3
+
+ WriteINIStr "$PLUGINSDIR\test.ini" "Field 5" "Flags" "GROUP|FILE_MUST_EXIST|FILE_EXPLORER|FILE_HIDEREADONLY|DISABLED"
+ Goto +2
+
+ WriteINIStr "$PLUGINSDIR\test.ini" "Field 5" "Flags" "GROUP|FILE_MUST_EXIST|FILE_EXPLORER|FILE_HIDEREADONLY"
+ Abort ; Return to the page
+
+clearbtn:
+ ; Clear all text fields
+ ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 5" "HWND"
+ SendMessage $1 ${WM_SETTEXT} 0 "STR:"
+ ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 6" "HWND"
+ SendMessage $1 ${WM_SETTEXT} 0 "STR:"
+ ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 8" "HWND"
+ SendMessage $1 ${WM_SETTEXT} 0 "STR:"
+ Abort ; Return to the page
+
+droplist:
+ ; Make the DirRequest field depend on the droplist
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 11" "State"
+ StrCmp $0 "Show" +3
+ StrCpy $0 0
+ Goto +2
+ StrCpy $0 1
+ ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 6" "HWND"
+ EnableWindow $1 $0
+ ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 6" "HWND2"
+ EnableWindow $1 $0
+ ; Add the disabled flag too so when we return to this page it's disabled again
+ StrCmp $0 0 0 +3
+
+ WriteINIStr "$PLUGINSDIR\test.ini" "Field 6" "Flags" "DISABLED"
+ Goto +2
+
+ WriteINIStr "$PLUGINSDIR\test.ini" "Field 6" "Flags" ""
+ Abort ; Return to the page
+
+validate:
+ ; At this point we know the Next button was pressed, so perform any validation
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 2" "State"
+ StrCmp $0 1 done
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 3" "State"
+ StrCmp $0 1 done
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 4" "State"
+ StrCmp $0 1 done
+ MessageBox MB_ICONEXCLAMATION|MB_OK "You must select at least one install option!"
+ Abort
+done:
+
+FunctionEnd
+
+; Installation page
+Page instfiles
+
+Section
+
+ ;Get Install Options dialog user input
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 2" "State"
+ DetailPrint "Install X=$0"
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 3" "State"
+ DetailPrint "Install Y=$0"
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 4" "State"
+ DetailPrint "Install Z=$0"
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 5" "State"
+ DetailPrint "File=$0"
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 6" "State"
+ DetailPrint "Dir=$0"
+ ReadINIStr $0 "$PLUGINSDIR\test.ini" "Field 8" "State"
+ DetailPrint "Info=$0"
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/Library.nsi b/KattekerCreator/nsis/Examples/Library.nsi
new file mode 100644
index 0000000..cffc973
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Library.nsi
@@ -0,0 +1,130 @@
+# This example tests the compile time aspect of the Library macros
+# more than the runtime aspect. It is more of a syntax example,
+# rather than a usage example.
+
+!include "Library.nsh"
+
+Name "Library Test"
+OutFile "Library Test.exe"
+
+InstallDir "$TEMP\Library Test"
+
+Page directory
+Page instfiles
+
+XPStyle on
+
+RequestExecutionLevel user
+
+
+!define TestDLL '"${NSISDIR}\Plugins\${NSIS_CPU}-unicode\LangDLL.dll"'
+!define TestEXE '"${NSISDIR}\Contrib\UIs\default.exe"'
+
+Section
+
+!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib DLL NOTSHARED NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib DLL NOTSHARED NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLL NOTSHARED NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLL NOTSHARED NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib TLB NOTSHARED REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib TLB NOTSHARED NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib TLB NOTSHARED REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib TLB NOTSHARED NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib REGDLLTLB NOTSHARED REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLLTLB NOTSHARED NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLLTLB NOTSHARED REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLLTLB NOTSHARED NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib DLL $0 REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib DLL $0 NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib DLL $0 REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib DLL $0 NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib REGDLL $0 REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLL $0 NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLL $0 REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLL $0 NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib TLB $0 REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib TLB $0 NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib TLB $0 REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib TLB $0 NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib REGDLLTLB $0 REBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLLTLB $0 NOREBOOT_PROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLLTLB $0 REBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+!insertmacro InstallLib REGDLLTLB $0 NOREBOOT_NOTPROTECTED ${TestDLL} $INSTDIR\test.dll $INSTDIR
+
+!insertmacro InstallLib REGEXE $0 REBOOT_PROTECTED ${TestEXE} $INSTDIR\test.exe $INSTDIR
+!insertmacro InstallLib REGEXE $0 NOREBOOT_PROTECTED ${TestEXE} $INSTDIR\test.exe $INSTDIR
+!insertmacro InstallLib REGEXE $0 REBOOT_NOTPROTECTED ${TestEXE} $INSTDIR\test.exe $INSTDIR
+!insertmacro InstallLib REGEXE $0 NOREBOOT_NOTPROTECTED ${TestEXE} $INSTDIR\test.exe $INSTDIR
+
+WriteUninstaller $INSTDIR\uninstall.exe
+
+SectionEnd
+
+Section uninstall
+
+!insertmacro UninstallLib DLL NOTSHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib DLL NOTSHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib DLL NOTSHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib REGDLL NOTSHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL NOTSHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL NOTSHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL NOTSHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib TLB NOTSHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib TLB NOTSHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib TLB NOTSHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib TLB NOTSHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib TLB NOTSHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib REGDLLTLB NOTSHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB NOTSHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB NOTSHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB NOTSHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB NOTSHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib DLL SHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib DLL SHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib DLL SHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib DLL SHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib DLL SHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib REGDLL SHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL SHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL SHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL SHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLL SHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib TLB SHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib TLB SHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib TLB SHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib TLB SHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib TLB SHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib REGDLLTLB SHARED NOREMOVE $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB SHARED REBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB SHARED NOREBOOT_PROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB SHARED REBOOT_NOTPROTECTED $INSTDIR\test.dll
+!insertmacro UninstallLib REGDLLTLB SHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.dll
+
+!insertmacro UninstallLib REGEXE SHARED NOREMOVE $INSTDIR\test.exe
+!insertmacro UninstallLib REGEXE SHARED REBOOT_PROTECTED $INSTDIR\test.exe
+!insertmacro UninstallLib REGEXE SHARED NOREBOOT_PROTECTED $INSTDIR\test.exe
+!insertmacro UninstallLib REGEXE SHARED REBOOT_NOTPROTECTED $INSTDIR\test.exe
+!insertmacro UninstallLib REGEXE SHARED NOREBOOT_NOTPROTECTED $INSTDIR\test.exe
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/LogicLib.nsi b/KattekerCreator/nsis/Examples/LogicLib.nsi
new file mode 100644
index 0000000..ce7574b
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/LogicLib.nsi
@@ -0,0 +1,619 @@
+!verbose 2
+
+Name "NSIS LogicLib Example"
+OutFile "LogicLib.exe"
+ShowInstDetails show
+RequestExecutionLevel user
+
+!include "LogicLib.nsh"
+
+;!undef LOGICLIB_VERBOSITY
+;!define LOGICLIB_VERBOSITY 4 ; For debugging - watch what logiclib does with your code!
+
+Page components "" "" ComponentsLeave
+Page instfiles
+
+Section /o "Run tests" TESTS
+
+ ; kinds of if other than "value1 comparison value2"
+ ClearErrors
+ FindFirst $R1 $R2 "$PROGRAMFILES\*"
+ ${Unless} ${Errors}
+ ${Do}
+ ${Select} $R2
+ ${Case2} "." ".."
+ ; Do nothing
+ ${CaseElse}
+ DetailPrint "Found $PROGRAMFILES\$R2"
+ ${EndSelect}
+ FindNext $R1 $R2
+ ${LoopUntil} ${Errors}
+ FindClose $R1
+ ${EndUnless}
+
+ ${If} ${FileExists} "${__FILE__}"
+ DetailPrint 'Source file "${__FILE__}" still exists'
+ ${Else}
+ DetailPrint 'Source file "${__FILE__}" has gone'
+ ${EndIf}
+
+ ; if..endif
+ StrCpy $R1 1
+ StrCpy $R2 ""
+ ${If} $R1 = 1
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} $R1 = 2
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} $R1 < 2
+ StrCpy $R2 $R2C
+ ${EndIf}
+ ${If} $R1 < -2
+ StrCpy $R2 $R2D
+ ${EndIf}
+ ${If} $R1 > 2
+ StrCpy $R2 $R2E
+ ${EndIf}
+ ${If} $R1 > -2
+ StrCpy $R2 $R2F
+ ${EndIf}
+ ${If} $R1 <> 1
+ StrCpy $R2 $R2G
+ ${EndIf}
+ ${If} $R1 <> 2
+ StrCpy $R2 $R2H
+ ${EndIf}
+ ${If} $R1 >= 2
+ StrCpy $R2 $R2I
+ ${EndIf}
+ ${If} $R1 >= -2
+ StrCpy $R2 $R2J
+ ${EndIf}
+ ${If} $R1 <= 2
+ StrCpy $R2 $R2K
+ ${EndIf}
+ ${If} $R1 <= -2
+ StrCpy $R2 $R2L
+ ${EndIf}
+ ${If} $R2 == "ACFHJK"
+ DetailPrint "PASSED If..EndIf test"
+ ${Else}
+ DetailPrint "FAILED If..EndIf test"
+ ${EndIf}
+
+ ; if..elseif..else..endif
+ StrCpy $R1 A
+ StrCpy $R2 ""
+ ${If} $R1 == A
+ StrCpy $R2 $R2A
+ ${ElseIf} $R1 == B
+ StrCpy $R2 $R2B
+ ${ElseUnless} $R1 != C
+ StrCpy $R2 $R2C
+ ${Else}
+ StrCpy $R2 $R2D
+ ${EndIf}
+ ${If} $R1 == D
+ StrCpy $R2 $R2D
+ ${ElseIf} $R1 == A
+ StrCpy $R2 $R2A
+ ${ElseUnless} $R1 != B
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2C
+ ${EndIf}
+ ${If} $R1 == C
+ StrCpy $R2 $R2C
+ ${ElseIf} $R1 == D
+ StrCpy $R2 $R2D
+ ${ElseUnless} $R1 != A
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} $R1 == B
+ StrCpy $R2 $R2B
+ ${ElseIf} $R1 == C
+ StrCpy $R2 $R2C
+ ${ElseUnless} $R1 != D
+ StrCpy $R2 $R2D
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} $R2 == "$R1$R1$R1$R1"
+ DetailPrint "PASSED If..ElseIf..Else..EndIf test"
+ ${Else}
+ DetailPrint "FAILED If..ElseIf..Else..EndIf test"
+ ${EndIf}
+
+ ; if..andif..orif..endif
+ StrCpy $R2 ""
+ ${If} 1 = 1
+ ${AndIf} 2 = 2
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 1
+ ${AndIf} 2 = 3
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 2
+ ${AndIf} 2 = 2
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 2
+ ${AndIf} 2 = 3
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+
+ ${If} 1 = 1
+ ${OrIf} 2 = 2
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 1
+ ${OrIf} 2 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 2
+ ${OrIf} 2 = 2
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 2
+ ${OrIf} 2 = 3
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+
+ ${If} 1 = 1
+ ${AndIf} 2 = 2
+ ${OrIf} 3 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 1
+ ${AndIf} 2 = 3
+ ${OrIf} 3 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 2
+ ${AndIf} 2 = 2
+ ${OrIf} 3 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 2
+ ${AndIf} 2 = 3
+ ${OrIf} 3 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 1
+ ${AndIf} 2 = 2
+ ${OrIf} 3 = 4
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 1
+ ${AndIf} 2 = 3
+ ${OrIf} 3 = 4
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 2
+ ${AndIf} 2 = 2
+ ${OrIf} 3 = 4
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 2
+ ${AndIf} 2 = 3
+ ${OrIf} 3 = 4
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+
+ ${If} 1 = 1
+ ${OrIf} 2 = 2
+ ${AndIf} 3 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 1
+ ${OrIf} 2 = 3
+ ${AndIf} 3 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 2
+ ${OrIf} 2 = 2
+ ${AndIf} 3 = 3
+ StrCpy $R2 $R2A
+ ${Else}
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 1 = 2
+ ${OrIf} 2 = 3
+ ${AndIf} 3 = 3
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 1
+ ${OrIf} 2 = 2
+ ${AndIf} 3 = 4
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 1
+ ${OrIf} 2 = 3
+ ${AndIf} 3 = 4
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 2
+ ${OrIf} 2 = 2
+ ${AndIf} 3 = 4
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 1 = 2
+ ${OrIf} 2 = 3
+ ${AndIf} 3 = 4
+ StrCpy $R2 $R2B
+ ${Else}
+ StrCpy $R2 $R2A
+ ${EndIf}
+
+ ${If} $R2 == "AAAAAAAAAAAAAAAAAAAAAAAA"
+ DetailPrint "PASSED If..AndIf..OrIf..Else..EndIf test"
+ ${Else}
+ DetailPrint "FAILED If..AndIf..OrIf..Else..EndIf test"
+ ${EndIf}
+
+ ; ifthen..|..|
+ StrCpy $R1 1
+ StrCpy $R2 ""
+ ${IfThen} $R1 = 1 ${|} StrCpy $R2 $R2A ${|}
+ ${IfThen} $R1 = 2 ${|} StrCpy $R2 $R2B ${|}
+ ${IfNotThen} $R1 = 1 ${|} StrCpy $R2 $R2C ${|}
+ ${IfNotThen} $R1 = 2 ${|} StrCpy $R2 $R2D ${|}
+ ${If} $R2 == "AD"
+ DetailPrint "PASSED IfThen test"
+ ${Else}
+ DetailPrint "FAILED IfThen test"
+ ${EndIf}
+
+ ; ifcmd..||..| and if/unless cmd
+ StrCpy $R2 ""
+ ${IfCmd} MessageBox MB_YESNO "Please click Yes" IDYES ${||} StrCpy $R2 $R2A ${|}
+ ${Unless} ${Cmd} `MessageBox MB_YESNO|MB_DEFBUTTON2 "Please click No" IDYES`
+ StrCpy $R2 $R2B
+ ${EndUnless}
+ ${If} $R2 == "AB"
+ DetailPrint "PASSED IfCmd/If Cmd test"
+ ${Else}
+ DetailPrint "FAILED IfCmd/If Cmd test"
+ ${EndIf}
+
+ ; select..case..case2..case3..case4..case5..caseelse..endselect
+ StrCpy $R1 1
+ StrCpy $R2 ""
+ ${Select} $R1
+ ${Case} "1"
+ StrCpy $R2 $R2A
+ ${Case} "2"
+ StrCpy $R2 $R2B
+ ${Case2} "3" "4"
+ StrCpy $R2 $R2C
+ ${CaseElse}
+ StrCpy $R2 $R2D
+ ${EndSelect}
+ ${Select} $R1
+ ${Case} "2"
+ StrCpy $R2 $R2A
+ ${Case} "3"
+ StrCpy $R2 $R2B
+ ${Case2} "4" "5"
+ StrCpy $R2 $R2C
+ ${CaseElse}
+ StrCpy $R2 $R2D
+ ${EndSelect}
+ ${Select} $R1
+ ${Case} "3"
+ StrCpy $R2 $R2A
+ ${Case} "4"
+ StrCpy $R2 $R2B
+ ${Case2} "5" "1"
+ StrCpy $R2 $R2C
+ ${CaseElse}
+ StrCpy $R2 $R2D
+ ${EndSelect}
+ ${Select} $R1
+ ${Case} "4"
+ StrCpy $R2 $R2A
+ ${Case} "5"
+ StrCpy $R2 $R2B
+ ${Case2} "1" "2"
+ StrCpy $R2 $R2C
+ ${CaseElse}
+ StrCpy $R2 $R2D
+ ${EndSelect}
+ ${If} $R2 == "ADCC"
+ DetailPrint "PASSED Select..Case*..EndSelect test"
+ ${Else}
+ DetailPrint "FAILED Select..Case*..EndSelect test"
+ ${EndIf}
+
+ ; switch..case..caseelse..endswitch
+ StrCpy $R2 ""
+ ${For} $R1 1 10
+ ${Switch} $R1
+ ${Case} 3
+ StrCpy $R2 $R2A
+ ${Case} 4
+ StrCpy $R2 $R2B
+ ${Break}
+ ${Case} 5
+ StrCpy $R2 $R2C
+ ${EndSwitch}
+ ${Switch} $R1
+ ${Case} 1
+ StrCpy $R2 $R2D
+ ${Default}
+ StrCpy $R2 $R2E
+ ${Break}
+ ${Case} 2
+ StrCpy $R2 $R2F
+ ${EndSwitch}
+ ${Switch} $R1
+ ${Case} 6
+ ${Case} 7
+ StrCpy $R2 $R2G
+ ${If} $R1 = 6
+ ${Case} 8
+ StrCpy $R2 $R2H
+ ${Switch} $R1
+ ${Case} 6
+ StrCpy $R2 $R2I
+ ${Break}
+ ${Case} 8
+ StrCpy $R2 $R2J
+ ${EndSwitch}
+ ${EndIf}
+ StrCpy $R2 $R2K
+ ${Break}
+ ${Default}
+ StrCpy $R2 $R2L
+ ${Case} 9
+ StrCpy $R2 $R2M
+ ${EndSwitch}
+ ${Next}
+ ${If} $R2 == "DELMFLMABELMBELMCELMEGHIKEGKEHJKEMELM"
+ DetailPrint "PASSED Switch..Case*..EndSwitch test"
+ ${Else}
+ DetailPrint "FAILED Switch..Case*..EndSwitch test"
+ ${EndIf}
+
+ ; for[each]..exitfor..next
+ StrCpy $R2 ""
+ ${For} $R1 1 5
+ StrCpy $R2 $R2$R1
+ ${Next}
+ ${ForEach} $R1 10 1 - 1
+ StrCpy $R2 $R2$R1
+ ${Next}
+ ${For} $R1 1 0
+ StrCpy $R2 $R2$R1
+ ${Next}
+ ${If} $R2 == "1234510987654321"
+ DetailPrint "PASSED For[Each]..Next test"
+ ${Else}
+ DetailPrint "FAILED For[Each]..Next test"
+ ${EndIf}
+
+ ; do..loop
+ StrCpy $R1 0
+ Call DoLoop
+ ${If} $R1 == 5
+ DetailPrint "PASSED Do..Loop test"
+ ${Else}
+ DetailPrint "FAILED Do..Loop test"
+ ${EndIf}
+
+ ; do..exitdo..loop
+ StrCpy $R1 0
+ StrCpy $R2 ""
+ ${Do}
+ StrCpy $R2 $R2$R1
+ IntOp $R1 $R1 + 1
+ ${If} $R1 > 10
+ ${ExitDo}
+ ${EndIf}
+ ${Loop}
+ ${If} $R2 == "012345678910"
+ DetailPrint "PASSED Do..ExitDo..Loop test"
+ ${Else}
+ DetailPrint "FAILED Do..ExitDo..Loop test"
+ ${EndIf}
+
+ ; do..exitdo..loopuntil
+ StrCpy $R1 0
+ StrCpy $R2 ""
+ ${Do}
+ StrCpy $R2 $R2$R1
+ IntOp $R1 $R1 + 1
+ ${LoopUntil} $R1 >= 5
+ ${If} $R2 == "01234"
+ DetailPrint "PASSED Do..ExitDo..LoopUntil test"
+ ${Else}
+ DetailPrint "FAILED Do..ExitDo..LoopUntil test"
+ ${EndIf}
+
+ ; dountil..exitdo..loop
+ StrCpy $R1 0
+ StrCpy $R2 ""
+ ${DoUntil} $R1 >= 5
+ StrCpy $R2 $R2$R1
+ IntOp $R1 $R1 + 1
+ ${Loop}
+ ${If} $R2 == "01234"
+ DetailPrint "PASSED DoUntil..ExitDo..Loop test"
+ ${Else}
+ DetailPrint "FAILED DoUntil..ExitDo..Loop test"
+ ${EndIf}
+
+ ; nested do test
+ StrCpy $R1 0
+ StrCpy $R2 0
+ StrCpy $R3 ""
+ ${Do}
+ StrCpy $R3 $R3$R1$R2
+ IntOp $R1 $R1 + 1
+ ${If} $R1 > 5
+ ${ExitDo}
+ ${EndIf}
+ StrCpy $R2 0
+ ${Do}
+ StrCpy $R3 $R3$R1$R2
+ IntOp $R2 $R2 + 1
+ ${If} $R2 >= 5
+ ${ExitDo}
+ ${EndIf}
+ ${Loop}
+ ${Loop}
+ ${If} $R3 == "00101112131415202122232425303132333435404142434445505152535455"
+ DetailPrint "PASSED nested Do test"
+ ${Else}
+ DetailPrint "FAILED nested Do test"
+ ${EndIf}
+
+ ; while..exitwhile..endwhile (exact replica of dowhile..enddo}
+ StrCpy $R1 0
+ StrCpy $R2 ""
+ ${While} $R1 < 5
+ StrCpy $R2 $R2$R1
+ IntOp $R1 $R1 + 1
+ ${EndWhile}
+ ${If} $R2 == "01234"
+ DetailPrint "PASSED While..ExitWhile..EndWhile test"
+ ${Else}
+ DetailPrint "FAILED While..ExitWhile..EndWhile test"
+ ${EndIf}
+
+ ; Unsigned integer tests
+ StrCpy $R2 ""
+ ${If} -1 < 1
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} -1 U< 1
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 0xFFFFFFFF > 1
+ StrCpy $R2 $R2C
+ ${EndIf}
+ ${If} 0xFFFFFFFF U> 1
+ StrCpy $R2 $R2D
+ ${EndIf}
+ ${If} $R2 == "AD"
+ DetailPrint "PASSED unsigned integer test"
+ ${Else}
+ DetailPrint "FAILED unsigned integer test"
+ ${EndIf}
+
+ ; 64-bit integer tests (uses System.dll)
+ StrCpy $R2 ""
+ ${If} 0x100000000 L= 4294967296
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} 0x100000000 L< 0x200000000
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} 0x500000000 L>= 0x500000000
+ StrCpy $R2 $R2C
+ ${EndIf}
+ ${If} $R2 == "ABC"
+ DetailPrint "PASSED 64-bit integer test"
+ ${Else}
+ DetailPrint "FAILED 64-bit integer test"
+ ${EndIf}
+
+ ; Extra string tests (uses System.dll)
+ StrCpy $R2 ""
+ ${If} "A" S< "B"
+ StrCpy $R2 $R2A
+ ${EndIf}
+ ${If} "b" S> "A"
+ StrCpy $R2 $R2B
+ ${EndIf}
+ ${If} "a" S<= "B"
+ StrCpy $R2 $R2C
+ ${EndIf}
+ ${If} "B" S< "B"
+ StrCpy $R2 $R2D
+ ${EndIf}
+ ${If} "A" S== "A"
+ StrCpy $R2 $R2E
+ ${EndIf}
+ ${If} "A" S== "a"
+ StrCpy $R2 $R2F
+ ${EndIf}
+ ${If} "A" S!= "a"
+ StrCpy $R2 $R2G
+ ${EndIf}
+ ${If} $R2 == "ABCEG"
+ DetailPrint "PASSED extra string test"
+ ${Else}
+ DetailPrint "FAILED extra string test"
+ ${EndIf}
+
+SectionEnd
+
+Function ComponentsLeave
+ ; Section flags tests (requires sections.nsh be included)
+ ${Unless} ${SectionIsSelected} ${TESTS}
+ MessageBox MB_OK "Please select the component"
+ Abort
+ ${EndIf}
+FunctionEnd
+
+Function DoLoop
+
+ ${Do}
+ IntOp $R1 $R1 + 1
+ ${If} $R1 == 5
+ Return
+ ${EndIf}
+ ${Loop}
+
+FunctionEnd
+
+!verbose 3
diff --git a/KattekerCreator/nsis/Examples/Math/math.nsi b/KattekerCreator/nsis/Examples/Math/math.nsi
new file mode 100644
index 0000000..a32ab3c
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Math/math.nsi
@@ -0,0 +1,33 @@
+; This is just an example of Math plugin
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+Name "Math Plugin Example"
+OutFile "math.exe"
+ShowInstDetails show
+XPStyle on
+
+Section "ThisNameIsIgnoredSoWhyBother?"
+ Math::Script 'SaR(s,fa,ra, i,f,r,e,p) (i=0;#{i=0, (NS=s[p+4,]; NS=#[p>0,s[,p-1],'']), (NS='';NS=s)])"
+
+ Math::Script "a = 'Hello \r\n World \r\n!!!'; a = SaR(a,{'\r','\n'},{'$\r','$\n'}); R0 = a"
+ Math::Script "NS = '$\"In quotes$\"'; TQ(); R1=NS; R3=P(s(R1),'qu')"
+ Math::Script "NS = 'No quotes'; TQ(); R2=NS"
+ Math::Script "NS='123\r\n456\r\n789'; DL(); R4=NS; DL(); R5=NS; DL(); R6=NS; R7=NS"
+
+
+ DetailPrint "'$R0'"
+ DetailPrint "'$R1'"
+ DetailPrint "'$R2'"
+ DetailPrint "'$R3'"
+ DetailPrint "'$R4'"
+ DetailPrint "'$R5'"
+ DetailPrint "'$R6'"
+ DetailPrint "'$R7'"
+SectionEnd
+
+; eof
diff --git a/KattekerCreator/nsis/Examples/Math/mathtest.ini b/KattekerCreator/nsis/Examples/Math/mathtest.ini
new file mode 100644
index 0000000..f18075b
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Math/mathtest.ini
@@ -0,0 +1,101 @@
+[Settings]
+NumFields=10
+NextButtonText=Execute
+CancelButtonText=Quit
+BackButtonText=Readme
+
+[Field 1]
+Type=label
+Text=Enter your script here:
+Left=0
+Right=-1
+Top=0
+Bottom=8
+
+[Field 2]
+Type=text
+Left=0
+Right=-1
+Top=9
+Bottom=55
+flags=MULTILINE|WANTRETURN|HSCROLL
+State=""
+
+[Field 3]
+Type=text
+Left=53
+Right=175
+Top=56
+Bottom=140
+flags=MULTILINE|READONLY
+State=""
+
+[Field 4]
+Type=text
+Left=175
+Right=-1
+Top=56
+Bottom=140
+flags=MULTILINE|READONLY
+State=""
+
+[Field 5]
+Type=RadioButton
+Left=0
+Right=-1
+Top=70
+Bottom=80
+flags=GROUP
+Text="Your script"
+State=1
+
+[Field 6]
+Type=RadioButton
+Left=0
+Right=-1
+Top=80
+Bottom=90
+flags=
+Text="Sample 1"
+State=0
+
+[Field 7]
+Type=RadioButton
+Left=0
+Right=-1
+Top=90
+Bottom=100
+flags=
+Text="Sample 2"
+State=0
+
+[Field 8]
+Type=RadioButton
+Left=0
+Right=-1
+Top=100
+Bottom=110
+flags=
+Text="Sample 3"
+State=0
+
+[Field 9]
+Type=RadioButton
+Left=0
+Right=-1
+Top=110
+Bottom=120
+flags=
+Text="Sample 4"
+State=0
+
+[Field 10]
+Type=RadioButton
+Left=0
+Right=-1
+Top=120
+Bottom=130
+flags=
+Text="Sample 5"
+State=0
+
diff --git a/KattekerCreator/nsis/Examples/Math/mathtest.nsi b/KattekerCreator/nsis/Examples/Math/mathtest.nsi
new file mode 100644
index 0000000..191fa8b
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Math/mathtest.nsi
@@ -0,0 +1,171 @@
+;NSIS Modern User Interface version 1.65
+;InstallOptions Example Script
+;Written by Joost Verburg
+
+ !define MUI_BUTTONTEXT_NEXT "Execute"
+
+;---------------------
+;Include Modern UI
+
+ !include "MUI.nsh"
+
+;--------------------------------
+;Product Info
+
+Name "Math::Script Test"
+
+;--------------------------------
+;Configuration
+
+ ;General
+ OutFile "MathTest.exe"
+
+;--------------------------------
+;Variables
+
+ Var TEMP1
+ Var TEMP2
+ Var TEMP3
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE "mathtest.txt"
+ Page custom ScriptPageEnter
+ Page instfiles
+
+;--------------------------------
+;Modern UI Configuration
+
+; !define MUI_ABORTWARNING
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Reserve Files
+
+ ;Things that need to be extracted on first (keep these lines before any File command!)
+ ;Only for BZIP2 compression
+
+ ReserveFile "MathTest.ini"
+ !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+;--------------------------------
+;Installer Functions
+
+LangString SCRIPTSAMPLE0 ${LANG_ENGLISH} "r0 = 'Hello'; r1 = 'Math::Script'\r\nr0 += ' from the ' + r1 + '!'; r1=''"
+LangString SCRIPTSAMPLE1 ${LANG_ENGLISH} "a =0; b=1.0\r\n#{a++ < 100, b *= a}\r\nr0 = a; R0 = b; R1 = ff(b, 15)\r\nr1 = (a-1) + '! = ' + b"
+LangString SCRIPTSAMPLE2 ${LANG_ENGLISH} 'pi=3.14159; \r\nangle = pi/4;\r\ntext = "x = " + ff(angle,16+3) \r\nr0 = text += ", sin x = " + sin(angle)'
+LangString SCRIPTSAMPLE3 ${LANG_ENGLISH} "v1 = 123.456; v2 = 123456789.1011\r\nr0 = v1; r1 = v2\r\nr2 = ff(v1, 3); r3 = ff(v2, 3); r4 = ff(v1, 3+16); r5 = ff(v2, 3+16)\r\nr6 = ff(v1, 3+32); r7 = ff(v2, 3+32); r8 = ff(v1, 3+32+64); r9 = ff(v2, 3+32+64)\r\n"
+LangString SCRIPTSAMPLE4 ${LANG_ENGLISH} "a = 10000; b = 0; #{--a > 0, b+= a}; r0 = a; r1 = b\r\nz = 1.55; r2 = #[z > 1.5, 'Its greater', 'Its lower']\r\nz = 1.45; r3 = #[z > 1.5, 'Its greater', 'Its lower']"
+LangString SCRIPTSAMPLE5 ${LANG_ENGLISH} 'r0 = "123a123"\r\nr1 = r0; \r\nr2 = s(r0); r3 = f(r0); r4 = i(r0); r5 = l(r0)'
+
+Function .onInit
+
+ ;Extract InstallOptions INI files
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "MathTest.ini"
+
+ Strcpy "$TEMP1" "$(SCRIPTSAMPLE0)"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 2" "State" $TEMP1
+
+FunctionEnd
+
+LangString TEXT_IO_TITLE ${LANG_ENGLISH} "MathTest Script Page"
+LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Try your scripting capapibilites or test one of sample scripts"
+
+
+Function DumpVariables
+ Strcpy "$TEMP1" "$$0='$0'\r\n$$1='$1'\r\n$$2='$2'\r\n$$3='$3'\r\n$$4='$4'\r\n$$5='$5'\r\n$$6='$6'\r\n$$7='$7'\r\n$$8='$8'\r\n$$9='$9'"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 3" "State" $TEMP1
+ Strcpy "$TEMP1" "$$R0='$R0'\r\n$$R1='$R1'\r\n$$R2='$R2'\r\n$$R3='$R3'\r\n$$R4='$R4'\r\n$$R5='$R5'\r\n$$R6='$R6'\r\n$$R7='$R7'\r\n$$R8='$R8'\r\n$$R9='$R9'"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 4" "State" $TEMP1
+FunctionEnd
+
+Function ClearVariables
+ Math::Script "r0=r1=r2=r3=r4=r5=r6=r7=r8=r9=R0=R1=R2=R3=R4=R5=R6=R7=R8=R9=''"
+FunctionEnd
+
+Function GetLine
+ push $TEMP1
+ Math::Script "mtsDL()"
+ pop $TEMP2
+ pop $TEMP1
+FunctionEnd
+
+Function ExecuteScript
+ !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 2" "State"
+
+ Math::Script "mtsTQ(s) (s = s(NS); #[s[0]=='$\"',s=s[1,]]; #[s[-1]=='$\"',s=s[,-2]]; NS = s)"
+ Math::Script "mtsP(s,e, p,i) (p=-1;i=0; #{(i=0, (NS=s[p+4,]; NS=#[p>0,s[,p-1],'']), (NS='';NS=s)])"
+
+ push $TEMP1
+ ; remove ""
+ Math::Script "mtsTQ()"
+ pop $TEMP1
+
+ ; script at $TEMP1
+Go:
+ StrLen $TEMP3 $TEMP1
+ IntCmp $TEMP3 0 End
+ ; get single line to $TEMP2
+ Call GetLine
+; MessageBox MB_OK "'$TEMP2' '$TEMP1'"
+ Math::Script "$TEMP2"
+ goto Go
+End:
+ Math::Script ""
+FunctionEnd
+
+Function ScriptPageEnter
+
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
+
+Again:
+ Call ClearVariables
+ Call ExecuteScript
+ Call DumpVariables
+
+ !insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN "mathtest.ini"
+ pop $TEMP3
+
+ !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 5" "State"
+ IntCmp $TEMP1 1 Test
+
+ Strcpy "$TEMP2" "$(SCRIPTSAMPLE1)"
+ !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 6" "State"
+ IntCmp $TEMP1 1 Write
+
+ Strcpy "$TEMP2" "$(SCRIPTSAMPLE2)"
+ !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 7" "State"
+ IntCmp $TEMP1 1 Write
+
+ Strcpy "$TEMP2" "$(SCRIPTSAMPLE3)"
+ !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 8" "State"
+ IntCmp $TEMP1 1 Write
+
+ Strcpy "$TEMP2" "$(SCRIPTSAMPLE4)"
+ !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 9" "State"
+ IntCmp $TEMP1 1 Write
+
+ Strcpy "$TEMP2" "$(SCRIPTSAMPLE5)"
+
+Write:
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 2" "State" "$TEMP2"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 5" "State" "1"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 6" "State" "0"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 7" "State" "0"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 8" "State" "0"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 9" "State" "0"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "MathTest.ini" "Field 10" "State" "0"
+
+Test:
+ Strcmp $TEMP3 "success" Again
+
+FunctionEnd
+
+Section "Dummy Section" SecDummy
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/Math/mathtest.txt b/KattekerCreator/nsis/Examples/Math/mathtest.txt
new file mode 100644
index 0000000..f911e66
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Math/mathtest.txt
@@ -0,0 +1,7 @@
+Math Tester.
+
+This demo allows you to test your Math::Script expressions without need to compile anything. Just enter your expressions into multiline editbox (every single line is a separate call to Math::Script) or select one of sample expressions and press Execute.
+
+Every call to Math::Script can accept up to 1kb of script, but this demo is limited to the summ of 1 kb at all lines. And... watch your scripts. No.... Watch your errors at scripts!
+
+(c) Brainsucker, 2003.
diff --git a/KattekerCreator/nsis/Examples/Memento.nsi b/KattekerCreator/nsis/Examples/Memento.nsi
new file mode 100644
index 0000000..531bc57
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Memento.nsi
@@ -0,0 +1,79 @@
+!include LogicLib.nsh
+!include Memento.nsh
+
+Name Memento
+OutFile Memento.exe
+
+XPStyle on
+
+ShowInstDetails show
+
+Page components
+Page instfiles
+
+RequestExecutionLevel user
+
+# settings
+
+!define MEMENTO_REGISTRY_ROOT HKCU
+!define MEMENTO_REGISTRY_KEY "Software\NSIS\Memento Test"
+
+# restore
+
+Function .onInit
+
+ ${If} ${Cmd} `MessageBox MB_YESNO "Would you like to load an example state?" IDYES`
+
+ DeleteRegKey HKCU "Software\NSIS\Memento Test"
+
+ WriteRegStr HKCU "Software\NSIS\Memento Test" MementoSectionUsed ""
+ WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_horse 1
+ WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_chicken 1
+ WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_donkey 0
+ WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_croc 0
+
+ ${EndIf}
+
+ ${MementoSectionRestore}
+
+FunctionEnd
+
+# sections
+
+${MementoSection} horse sec_horse
+${MementoSectionEnd}
+
+${MementoSection} donkey sec_donkey
+${MementoSectionEnd}
+
+${MementoSection} chicken sec_chicken
+${MementoSectionEnd}
+
+SectionGroup /e group
+
+ SectionGroup /e group
+
+ ${MementoSection} croc sec_croc
+ ${MementoSectionEnd}
+
+ ${MementoSection} cow sec_cow
+ ${MementoSectionEnd}
+
+ SectionGroupEnd
+
+SectionGroupEnd
+
+${MementoUnselectedSection} dinosaur sec_dinosaur
+${MementoSectionEnd}
+
+# done...
+
+${MementoSectionDone}
+
+# save
+
+Function .onInstSuccess
+
+ ${MementoSectionSave}
+
+FunctionEnd
diff --git a/KattekerCreator/nsis/Examples/Modern UI/Basic.nsi b/KattekerCreator/nsis/Examples/Modern UI/Basic.nsi
new file mode 100644
index 0000000..d0fc7a2
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Modern UI/Basic.nsi
@@ -0,0 +1,88 @@
+;NSIS Modern User Interface
+;Basic Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI2.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "Basic.exe"
+
+ ;Default installation folder
+ InstallDir "$LOCALAPPDATA\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel user
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Installer Sections
+
+Section "Dummy Section" SecDummy
+
+ SetOutPath "$INSTDIR"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ ;Store installation folder
+ WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
+
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+SectionEnd
+
+;--------------------------------
+;Descriptions
+
+ ;Language strings
+ LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
+
+ ;Assign language strings to sections
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ Delete "$INSTDIR\Uninstall.exe"
+
+ RMDir "$INSTDIR"
+
+ DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
+
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/Modern UI/HeaderBitmap.nsi b/KattekerCreator/nsis/Examples/Modern UI/HeaderBitmap.nsi
new file mode 100644
index 0000000..c31cdee
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Modern UI/HeaderBitmap.nsi
@@ -0,0 +1,90 @@
+;NSIS Modern User Interface
+;Header Bitmap Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI2.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "HeaderBitmap.exe"
+
+ ;Default installation folder
+ InstallDir "$LOCALAPPDATA\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel user
+
+;--------------------------------
+;Interface Configuration
+
+ !define MUI_HEADERIMAGE
+ !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" ; optional
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Installer Sections
+
+Section "Dummy Section" SecDummy
+
+ SetOutPath "$INSTDIR"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ ;Store installation folder
+ WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
+
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+SectionEnd
+
+;--------------------------------
+;Descriptions
+
+ ;Language strings
+ LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
+
+ ;Assign language strings to sections
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ Delete "$INSTDIR\Uninstall.exe"
+
+ RMDir "$INSTDIR"
+
+ DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
+
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/Modern UI/MultiLanguage.nsi b/KattekerCreator/nsis/Examples/Modern UI/MultiLanguage.nsi
new file mode 100644
index 0000000..118bb89
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Modern UI/MultiLanguage.nsi
@@ -0,0 +1,204 @@
+;NSIS Modern User Interface
+;Multilingual Example Script
+;Written by Joost Verburg
+
+!pragma warning error all
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI2.nsh"
+
+;--------------------------------
+;General
+
+ ;Properly display all languages (Installer will not work on Windows 95, 98 or ME!)
+ Unicode true
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "MultiLanguage.exe"
+
+ ;Default installation folder
+ InstallDir "$LOCALAPPDATA\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel user
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_ABORTWARNING
+
+ ;Show all languages, despite user's codepage
+ !define MUI_LANGDLL_ALLLANGUAGES
+
+;--------------------------------
+;Language Selection Dialog Settings
+
+ ;Remember the installer language
+ !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
+ !define MUI_LANGDLL_REGISTRY_KEY "Software\Modern UI Test"
+ !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_WELCOME
+ !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
+
+ !insertmacro MUI_UNPAGE_WELCOME
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+ !insertmacro MUI_UNPAGE_COMPONENTS
+ !insertmacro MUI_UNPAGE_DIRECTORY
+ !insertmacro MUI_UNPAGE_INSTFILES
+ !insertmacro MUI_UNPAGE_FINISH
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English" ; The first language is the default language
+ !insertmacro MUI_LANGUAGE "French"
+ !insertmacro MUI_LANGUAGE "German"
+ !insertmacro MUI_LANGUAGE "Spanish"
+ !insertmacro MUI_LANGUAGE "SpanishInternational"
+ !insertmacro MUI_LANGUAGE "SimpChinese"
+ !insertmacro MUI_LANGUAGE "TradChinese"
+ !insertmacro MUI_LANGUAGE "Japanese"
+ !insertmacro MUI_LANGUAGE "Korean"
+ !insertmacro MUI_LANGUAGE "Italian"
+ !insertmacro MUI_LANGUAGE "Dutch"
+ !insertmacro MUI_LANGUAGE "Danish"
+ !insertmacro MUI_LANGUAGE "Swedish"
+ !insertmacro MUI_LANGUAGE "Norwegian"
+ !insertmacro MUI_LANGUAGE "NorwegianNynorsk"
+ !insertmacro MUI_LANGUAGE "Finnish"
+ !insertmacro MUI_LANGUAGE "Greek"
+ !insertmacro MUI_LANGUAGE "Russian"
+ !insertmacro MUI_LANGUAGE "Portuguese"
+ !insertmacro MUI_LANGUAGE "PortugueseBR"
+ !insertmacro MUI_LANGUAGE "Polish"
+ !insertmacro MUI_LANGUAGE "Ukrainian"
+ !insertmacro MUI_LANGUAGE "Czech"
+ !insertmacro MUI_LANGUAGE "Slovak"
+ !insertmacro MUI_LANGUAGE "Croatian"
+ !insertmacro MUI_LANGUAGE "Bulgarian"
+ !insertmacro MUI_LANGUAGE "Hungarian"
+ !insertmacro MUI_LANGUAGE "Thai"
+ !insertmacro MUI_LANGUAGE "Romanian"
+ !insertmacro MUI_LANGUAGE "Latvian"
+ !insertmacro MUI_LANGUAGE "Macedonian"
+ !insertmacro MUI_LANGUAGE "Estonian"
+ !insertmacro MUI_LANGUAGE "Turkish"
+ !insertmacro MUI_LANGUAGE "Lithuanian"
+ !insertmacro MUI_LANGUAGE "Slovenian"
+ !insertmacro MUI_LANGUAGE "Serbian"
+ !insertmacro MUI_LANGUAGE "SerbianLatin"
+ !insertmacro MUI_LANGUAGE "Arabic"
+ !insertmacro MUI_LANGUAGE "Farsi"
+ !insertmacro MUI_LANGUAGE "Hebrew"
+ !insertmacro MUI_LANGUAGE "Indonesian"
+ !insertmacro MUI_LANGUAGE "Mongolian"
+ !insertmacro MUI_LANGUAGE "Luxembourgish"
+ !insertmacro MUI_LANGUAGE "Albanian"
+ !insertmacro MUI_LANGUAGE "Breton"
+ !insertmacro MUI_LANGUAGE "Belarusian"
+ !insertmacro MUI_LANGUAGE "Icelandic"
+ !insertmacro MUI_LANGUAGE "Malay"
+ !insertmacro MUI_LANGUAGE "Bosnian"
+ !insertmacro MUI_LANGUAGE "Kurdish"
+ !insertmacro MUI_LANGUAGE "Irish"
+ !insertmacro MUI_LANGUAGE "Uzbek"
+ !insertmacro MUI_LANGUAGE "Galician"
+ !insertmacro MUI_LANGUAGE "Afrikaans"
+ !insertmacro MUI_LANGUAGE "Catalan"
+ !insertmacro MUI_LANGUAGE "Esperanto"
+ !insertmacro MUI_LANGUAGE "Asturian"
+ !insertmacro MUI_LANGUAGE "Basque"
+ !insertmacro MUI_LANGUAGE "Pashto"
+ !insertmacro MUI_LANGUAGE "ScotsGaelic"
+ !insertmacro MUI_LANGUAGE "Georgian"
+ !insertmacro MUI_LANGUAGE "Vietnamese"
+ !insertmacro MUI_LANGUAGE "Welsh"
+ !insertmacro MUI_LANGUAGE "Armenian"
+ !insertmacro MUI_LANGUAGE "Corsican"
+ !insertmacro MUI_LANGUAGE "Tatar"
+ !insertmacro MUI_LANGUAGE "Hindi"
+
+;--------------------------------
+;Reserve Files
+
+ ;If you are using solid compression, files that are required before
+ ;the actual installation should be stored first in the data block,
+ ;because this will make your installer start faster.
+
+ !insertmacro MUI_RESERVEFILE_LANGDLL
+
+;--------------------------------
+;Installer Sections
+
+Section "Dummy Section" SecDummy
+
+ SetOutPath "$INSTDIR"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ ;Store installation folder
+ WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
+
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+SectionEnd
+
+;--------------------------------
+;Installer Functions
+
+Function .onInit
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+FunctionEnd
+
+;--------------------------------
+;Descriptions
+
+ ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
+
+ ;Assign descriptions to sections
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} "A test section."
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ Delete "$INSTDIR\Uninstall.exe"
+
+ RMDir "$INSTDIR"
+
+ DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
+
+SectionEnd
+
+;--------------------------------
+;Uninstaller Functions
+
+Function un.onInit
+
+ !insertmacro MUI_UNGETLANGUAGE
+
+FunctionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/Modern UI/StartMenu.nsi b/KattekerCreator/nsis/Examples/Modern UI/StartMenu.nsi
new file mode 100644
index 0000000..441fd65
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Modern UI/StartMenu.nsi
@@ -0,0 +1,114 @@
+;NSIS Modern User Interface
+;Start Menu Folder Selection Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI2.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "StartMenu.exe"
+
+ ;Default installation folder
+ InstallDir "$LOCALAPPDATA\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel user
+
+;--------------------------------
+;Variables
+
+ Var StartMenuFolder
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+
+ ;Start Menu Folder Page Configuration
+ !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
+ !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Modern UI Test"
+ !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+
+ !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
+
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Installer Sections
+
+Section "Dummy Section" SecDummy
+
+ SetOutPath "$INSTDIR"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ ;Store installation folder
+ WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
+
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+
+ ;Create shortcuts
+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
+ CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
+
+ !insertmacro MUI_STARTMENU_WRITE_END
+
+SectionEnd
+
+;--------------------------------
+;Descriptions
+
+ ;Language strings
+ LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
+
+ ;Assign language strings to sections
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ Delete "$INSTDIR\Uninstall.exe"
+
+ RMDir "$INSTDIR"
+
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+
+ Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
+ RMDir "$SMPROGRAMS\$StartMenuFolder"
+
+ DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
+
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/Modern UI/WelcomeFinish.nsi b/KattekerCreator/nsis/Examples/Modern UI/WelcomeFinish.nsi
new file mode 100644
index 0000000..2121ea1
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Modern UI/WelcomeFinish.nsi
@@ -0,0 +1,92 @@
+;NSIS Modern User Interface
+;Welcome/Finish Page Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI2.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "WelcomeFinish.exe"
+
+ ;Default installation folder
+ InstallDir "$LOCALAPPDATA\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel user
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_WELCOME
+ !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
+
+ !insertmacro MUI_UNPAGE_WELCOME
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+ !insertmacro MUI_UNPAGE_FINISH
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Installer Sections
+
+Section "Dummy Section" SecDummy
+
+ SetOutPath "$INSTDIR"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ ;Store installation folder
+ WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
+
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+SectionEnd
+
+;--------------------------------
+;Descriptions
+
+ ;Language strings
+ LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
+
+ ;Assign language strings to sections
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ Delete "$INSTDIR\Uninstall.exe"
+
+ RMDir "$INSTDIR"
+
+ DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/NSISMenu.nsi b/KattekerCreator/nsis/Examples/NSISMenu.nsi
new file mode 100644
index 0000000..9f8b830
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/NSISMenu.nsi
@@ -0,0 +1,300 @@
+OutFile "NSIS.exe"
+Name "NSIS Menu"
+Unicode True
+RequestExecutionLevel User
+XPStyle On
+ManifestDPIAware System
+SetCompressor LZMA
+ChangeUI IDD_INST "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
+Icon "${NSISDIR}\Contrib\Graphics\Icons\nsis-menu.ico"
+BrandingText " "
+MiscButtonText " " " " " " " "
+InstallButtonText " "
+CompletedText " "
+LangString ^ClickInstall 0 " "
+Caption "$(^Name)"
+
+!include nsDialogs.nsh
+!include WinMessages.nsh
+!include LogicLib.nsh
+!define /IfNDef IDC_CHILDRECT 1018
+!define QUIT_ON_EXECUTE
+!define PR $ExeDir ; Local root path
+!define PD "Docs" ; Local with WWW fallback (located at the same relative path)
+!define WWW "http://nsis.sf.net"
+
+!define CB_HEADER 0x755585
+!define UY_HEADER 28
+!define CB_PAGE 0xffffff
+!define CT_SECTION 0x666666
+!define CB_SECTION ${CB_PAGE}
+!define UY_SECTION 11 ; Height of a section
+!define UY_SECTIONBPAD 2 ; Extra padding on the bottom of section headers
+!define UY_TXT 9 ; Height of a normal item
+!define UY_TXTBPAD 1 ; Extra padding on the bottom of normal items
+!define UX_COLPAD 7 ; Spacing between columns
+!define UY_ROW2 104 ; Absolute position of the 2nd row
+!define CT_LINK 0x0c6e97 ; SYSCLR:HOTLIGHT
+!define /Math UX_PAGE 00 + ${UX_COLPAD}
+!define /Math UY_PAGE ${UY_HEADER} + 20
+!define UX ${UX_PAGE}
+
+Function PageLeave
+System::Call 'USER32::GetFocus()p.r0'
+System::Call 'USER32::GetDlgCtrlID(pr0)i.r1'
+System::Call 'USER32::GetParent(pr0)p.r2'
+SendMessage $2 ${WM_COMMAND} $1 $0 ; Handle in dialog by pretending it was a click on the active control
+Abort
+FunctionEnd
+
+Function PageCreate
+GetDlgItem $0 $hWndParent 1
+ShowWindow $0 0
+GetDlgItem $0 $hWndParent 2
+ShowWindow $0 0
+
+System::Call 'USER32::GetClientRect(p$hWndParent,@r0)'
+System::Call '*$0(i,i,i.r3,i.r4)'
+GetDlgItem $0 $hWndParent ${IDC_CHILDRECT}
+System::Call 'USER32::MoveWindow(pr0,i0,i0,ir3,ir4,i0)'
+
+nsDialogs::Create ${IDC_CHILDRECT}
+Pop $R9
+SetCtlColors $R9 000000 ${CB_PAGE}
+
+!macro StartColumn W
+!define /ReDef UY ${UY_PAGE}
+!define /ReDef UX_W ${W}
+!ifdef UX_INTERNAL_PREV_W
+!define /ReDef /Math UX ${UX} + ${UX_INTERNAL_PREV_W}
+!define /ReDef /Math UX ${UX} + ${UX_COLPAD}
+!define /ReDef UX_INTERNAL_PREV_W ${UX_W}
+!else
+!define /Math UX_INTERNAL_PREV_W 0 + ${UX_W}
+!endif
+!macroend
+!macro CreateHeader Txt W
+!define /ReDef /Math W ${W} + 4 ; Make it slightly wider
+${NSD_CreateLabel} ${UX}u ${UY}u ${W}u ${UY_SECTION}u "${Txt}"
+Pop $0
+SetCtlColors $0 ${CT_SECTION} transparent
+SendMessage $0 ${WM_SETFONT} ${HF_HEADER} 1
+!define /ReDef /Math UY ${UY} + ${UY_SECTION}
+!define /ReDef /Math UY ${UY} + ${UY_SECTIONBPAD}
+!macroend
+!macro CreateControl Class Txt W H
+${NSD_Create${Class}} ${UX}u ${UY}u ${W}u ${H}u "${Txt}"
+!define /ReDef /Math UY ${UY} + ${H}
+!define /ReDef /Math UY ${UY} + ${UY_TXTBPAD}
+!macroend
+!macro CreateSimpleLinkHelper Txt Url W
+!insertmacro CreateControl Link "${Txt}|${Url}" ${W} ${UY_TXT}
+!macroend
+!macro CreateSimpleLink Txt Url W
+!insertmacro CreateSimpleLinkHelper "${Txt}" "${Url}" ${W}
+Call ConfigureLink
+!macroend
+
+
+; --- Header ---
+!define HF_HEADER $R8
+CreateFont ${HF_HEADER} "Arial" ${UY_SECTION} 700
+
+nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE} ${__NSD_Label_EXSTYLE} 33u 0 -33u ${UY_HEADER}u ""
+Pop $0
+SetCtlColors $0 0xffffff ${CB_HEADER}
+
+nsDialogs::CreateControl ${__NSD_Icon_CLASS} ${__NSD_Icon_STYLE}|${SS_CENTERIMAGE}|${SS_CENTER} ${__NSD_Icon_EXSTYLE} 0 0 33u ${UY_HEADER}u ""
+Pop $0
+SetCtlColors $0 "" ${CB_HEADER}
+${NSD_SetIconFromInstaller} $0 $1
+
+CreateFont $1 "Trebuchet MS" 17
+!searchreplace VERSTR "${NSIS_VERSION}" "v" ""
+nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE}|${SS_CENTERIMAGE}|${SS_ENDELLIPSIS} ${__NSD_Label_EXSTYLE} 34u 1u -34u ${UY_HEADER}u "nullsoft scriptable install system ${VERSTR}"
+Pop $0
+SetCtlColors $0 0x3A2A42 transparent
+SendMessage $0 ${WM_SETFONT} $1 1
+nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE}|${SS_CENTERIMAGE}|${SS_ENDELLIPSIS} ${__NSD_Label_EXSTYLE} 33u 0 -33u ${UY_HEADER}u "nullsoft scriptable install system ${VERSTR}"
+Pop $0
+SetCtlColors $0 0xffffff transparent
+SendMessage $0 ${WM_SETFONT} $1 1
+
+
+; --- Page ---
+!insertmacro StartColumn 90
+!insertmacro CreateHeader "Compiler" ${UX_W}
+!insertmacro CreateSimpleLink "Compile NSI scripts" "${PR}\MakeNSISW" ${UX_W}
+!insertmacro CreateSimpleLink "Installer based on .ZIP file" "${PR}\bin\Zip2Exe" ${UX_W}
+
+
+!define /ReDef UY ${UY_ROW2}
+!insertmacro CreateHeader "Developer Center" ${UX_W}
+!define /ReDef UY_MULTILINE 42
+!insertmacro CreateControl Label "Many more examples, tutorials, plug-ins and NSIS-releted software are available at the online Developer Center." ${UX_W} ${UY_MULTILINE}
+Pop $0
+SetCtlColors $0 00000000 ${CB_PAGE}
+
+
+!insertmacro StartColumn 80
+!insertmacro CreateHeader "Documentation" ${UX_W}
+!insertmacro CreateSimpleLink "NSIS Users Manual" "${PR}\NSIS.chm|${WWW}/Docs/" ${UX_W}
+!insertmacro CreateSimpleLink "Example scripts" "${PR}\Examples|${WWW}/Examples" ${UX_W}
+!insertmacro CreateSimpleLink "Modern UI 2" "${PD}\Modern UI 2\Readme.html" ${UX_W}
+
+
+!define /ReDef UY ${UY_ROW2}
+!insertmacro CreateHeader "Online Help" ${UX_W}
+!insertmacro CreateSimpleLink "Developer Center" "${WWW}/Developer_Center" ${UX_W}
+!insertmacro CreateSimpleLink "FAQ" "${WWW}/FAQ" ${UX_W}
+!insertmacro CreateSimpleLink "Forum" "http://forums.winamp.com/forumdisplay.php?forumid=65" ${UX_W}
+;"Project Tracker" "http://sourceforge.net/tracker/?group_id=22049"
+!insertmacro CreateSimpleLink "Bug Tracker" "http://sourceforge.net/tracker/?group_id=22049&atid=373085" ${UX_W}
+!insertmacro CreateSimpleLink "Stackoverflow" "http://stackoverflow.com/questions/tagged/nsis" ${UX_W}
+!insertmacro CreateSimpleLink "Slack collaboration hub" "${WWW}/r/Slack" ${UX_W}
+!insertmacro CreateSimpleLink "IRC channel" "irc://irc.landoleet.org/nsis" ${UX_W}
+;"Pastebin" "http://nsis.pastebin.com/index/1FtyKP89"
+;"Search" "http://www.google.com/cse/home?cx=005317984255499820329:c_glv1-6a6a"
+
+
+!insertmacro StartColumn 130
+!insertmacro CreateHeader "Plug-ins" ${UX_W}
+!macro CreatePluginLink Name Desc Url
+!define /ReDef SAVE_UY ${UY}
+!insertmacro CreateSimpleLinkHelper "${Name}" "${Url}" ${UX_W} ; AdjustLinkPair will configure this link
+!define /ReDef UY ${SAVE_UY}
+!insertmacro CreateControl Label "${Name} - ${Desc}" ${UX_W} ${UY_TXT}
+Call AdjustLinkPair
+!macroend
+!insertmacro CreatePluginLink "AdvSplash" "splash with fade in/out" "${PD}\AdvSplash\advsplash.txt"
+!insertmacro CreatePluginLink "Banner" "banner with custom text" "${PD}\Banner\Readme.txt"
+!insertmacro CreatePluginLink "BgImage" "background image" "${PD}\BgImage\BgImage.txt"
+!insertmacro CreatePluginLink "Dialer" "internet connection" "${PD}\Dialer\Dialer.txt"
+!insertmacro CreatePluginLink "Math" "math operations" "${PD}\Math\Math.txt"
+!insertmacro CreatePluginLink "nsDialogs" "custom wizard pages" "${PD}\nsDialogs\Readme.html"
+!insertmacro CreatePluginLink "nsExec" "launch command line tools" "${PD}\nsExec\nsExec.txt"
+!insertmacro CreatePluginLink "NSISdl" "download files" "${PD}\NSISdl\Readme.txt"
+!insertmacro CreatePluginLink "Splash" "splash screen" "${PD}\Splash\splash.txt"
+!insertmacro CreatePluginLink "StartMenu" "Start Menu folder selection" "${PD}\StartMenu\Readme.txt"
+!insertmacro CreatePluginLink "System" "Windows API calls" "${PD}\System\System.html"
+!insertmacro CreatePluginLink "VPatch" "update existing files" "${PD}\VPatch\Readme.html"
+
+
+; --- Footer ---
+${NSD_CreateLabel} 0 -22u 100% 1 ""
+Pop $0
+SetCtlColors $0 000000 0xc4c4c4
+
+nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE}|${SS_CENTERIMAGE}|${SS_NOTIFY} ${__NSD_Label_EXSTYLE} -110u -20u 100% 20u "nsis.sourceforge.net"
+Pop $0
+SetCtlColors $0 0xbbbbbb transparent
+SendMessage $0 ${WM_SETFONT} ${HF_HEADER} 1
+nsDialogs::SetUserData $0 "http://nsis.sourceforge.net"
+${NSD_OnClick} $0 OnLinkClick
+
+nsDialogs::Show
+FunctionEnd
+
+Function OnLinkClick
+Pop $1 ; HWND
+nsDialogs::GetUserData $1
+Call SplitPipe
+Pop $0 ; First URL in UserData from SplitPipe
+StrCpy $3 ""
+StrCpy $1 $0 4 ; Copy length of ${PD}
+${IfThen} $1 == "${PD}" ${|} StrCpy $3 "${PR}\" ${|}
+!ifdef QUIT_ON_EXECUTE
+System::Call 'USER32::GetKeyState(i0x11)i.r9' ; VK_CONTROL
+!endif
+ClearErrors
+ExecShell "" "$3$0"
+Pop $1 ; ... the rest of SplitPipe ...
+${If} $1 != "" ; ... might contain a fallback location
+ StrCpy $0 $1
+ StrCpy $3 ""
+${ElseIf} $3 != "" ; Local docs path failed, use WWW fallback
+ StrCpy $3 0
+ slashconvloop:
+ StrCpy $2 $0 1 $3
+ ${If} $2 == "\"
+ StrCpy $2 $0 $3
+ IntOp $3 $3 + 1
+ StrCpy $0 $0 "" $3
+ StrCpy $0 "$2/$0"
+ ${Else}
+ IntOp $3 $3 + 1
+ ${EndIf}
+ StrCmp $2 "" 0 slashconvloop
+ StrCpy $3 "${WWW}/"
+${EndIf}
+${If} "$3$1" != ""
+${AndIf} ${Errors}
+ ExecShell "" "$3$0"
+${EndIf}
+${If} ${Errors}
+ !ifdef QUIT_ON_EXECUTE
+ StrCpy $9 0 ; Don't allow close
+ !endif
+ MessageBox MB_IconStop 'Error: Unable to open "$0"!'
+${EndIf}
+!ifdef QUIT_ON_EXECUTE
+${IfThen} $9 < 0 ${|} SendMessage $hWndParent ${WM_CLOSE} 0 0 ${|}
+!endif
+FunctionEnd
+
+Function ConfigureLink
+Pop $1 ; HWND
+${NSD_OnClick} $1 OnLinkClick
+SetCtlColors $1 ${CT_LINK} ${CB_PAGE}
+${NSD_GetText} $1 $4
+Push $4
+Call SplitPipe
+Pop $4
+Pop $2
+${NSD_SetText} $1 $4
+nsDialogs::SetUserData $1 $2
+System::Call 'USER32::GetDC(pr1)p.r3'
+SendMessage $1 ${WM_GETFONT} 0 0 $5
+System::Call 'GDI32::SelectObject(pr3,pr5)p.s'
+StrLen $5 $4
+System::Call 'GDI32::GetTextExtentPoint32(pr3,tr4,ir5,@r5)'
+System::Call '*$5(i.r6)'
+System::Call 'GDI32::SelectObject(pr3,ps)'
+System::Call 'USER32::ReleaseDC(pr1,pr3)'
+System::Call 'USER32::GetWindowRect(pr1,@r3)'
+System::Call '*$3(i,i.r5,i,i.r7)'
+IntOp $7 $7 - $5
+IntOp $6 $6 + 4 ; Padding for focus rect
+System::Call 'USER32::SetWindowPos(pr1,p,i,i,ir6,ir7,i0x16)'
+FunctionEnd
+
+Function AdjustLinkPair
+Pop $2 ; Label
+SetCtlColors $2 00000000 ${CB_PAGE}
+Call ConfigureLink
+FunctionEnd
+
+Function SplitPipe
+Exch $0
+Push $1
+Push $2
+StrCpy $2 0
+findSep:
+StrCpy $1 $0 1 $2
+IntOp $2 $2 + 1
+StrCmp $1 "" +2
+StrCmp $1 "|" "" findSep
+StrCpy $1 $0 "" $2
+IntOp $2 $2 - 1
+StrCpy $0 $0 $2
+Pop $2
+Exch $1
+Exch
+Exch $0
+FunctionEnd
+
+Section
+SectionEnd
+
+Page Custom PageCreate PageLeave
+!pragma warning disable 8000 ; Page instfiles not used
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/Plugin/exdll-vs2008.sln b/KattekerCreator/nsis/Examples/Plugin/exdll-vs2008.sln
new file mode 100644
index 0000000..7b03ddc
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/exdll-vs2008.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exdll", "exdll-vs2008.vcproj", "{5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Debug|Win32.Build.0 = Debug|Win32
+ {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Release|Win32.ActiveCfg = Release|Win32
+ {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/KattekerCreator/nsis/Examples/Plugin/exdll-vs2008.vcproj b/KattekerCreator/nsis/Examples/Plugin/exdll-vs2008.vcproj
new file mode 100644
index 0000000..e4bb417
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/exdll-vs2008.vcproj
@@ -0,0 +1,266 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/KattekerCreator/nsis/Examples/Plugin/exdll.c b/KattekerCreator/nsis/Examples/Plugin/exdll.c
new file mode 100644
index 0000000..e4e807e
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/exdll.c
@@ -0,0 +1,42 @@
+#include
+#include // nsis plugin
+
+HINSTANCE g_hInstance;
+HWND g_hwndParent;
+
+// To work with Unicode version of NSIS, please use TCHAR-type
+// functions for accessing the variables and the stack.
+
+void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
+ LPTSTR variables, stack_t **stacktop,
+ extra_parameters *extra, ...)
+{
+ EXDLL_INIT();
+ g_hwndParent = hwndParent;
+
+
+ // note if you want parameters from the stack, pop them off in order.
+ // i.e. if you are called via exdll::myFunction file.dat read.txt
+ // calling popstring() the first time would give you file.dat,
+ // and the second time would give you read.txt.
+ // you should empty the stack of your parameters, and ONLY your
+ // parameters.
+
+ // do your stuff here
+ {
+ LPTSTR msgbuf = (LPTSTR) GlobalAlloc(GPTR, (3 + string_size + 1) * sizeof(*msgbuf));
+ if (msgbuf)
+ {
+ wsprintf(msgbuf, TEXT("$0=%s"), getuservariable(INST_0));
+ MessageBox(g_hwndParent, msgbuf, TEXT("Message from example plugin"), MB_OK);
+ GlobalFree(msgbuf);
+ }
+ }
+}
+
+
+BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance = hInst;
+ return TRUE;
+}
diff --git a/KattekerCreator/nsis/Examples/Plugin/exdll.dpr b/KattekerCreator/nsis/Examples/Plugin/exdll.dpr
new file mode 100644
index 0000000..ec70b10
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/exdll.dpr
@@ -0,0 +1,118 @@
+{
+ NSIS ExDLL example
+ (C) 2001 - Peter Windridge
+
+ Fixed and formatted by Brett Dever
+ http://editor.nfscheats.com/
+
+ Tested in Delphi 7.0
+}
+
+library exdll;
+
+uses Windows;
+
+type
+ VarConstants = (
+ INST_0,
+ INST_1, // $1
+ INST_2, // $2
+ INST_3, // $3
+ INST_4, // $4
+ INST_5, // $5
+ INST_6, // $6
+ INST_7, // $7
+ INST_8, // $8
+ INST_9, // $9
+ INST_R0, // $R0
+ INST_R1, // $R1
+ INST_R2, // $R2
+ INST_R3, // $R3
+ INST_R4, // $R4
+ INST_R5, // $R5
+ INST_R6, // $R6
+ INST_R7, // $R7
+ INST_R8, // $R8
+ INST_R9, // $R9
+ INST_CMDLINE, // $CMDLINE
+ INST_INSTDIR, // $INSTDIR
+ INST_OUTDIR, // $OUTDIR
+ INST_EXEDIR, // $EXEDIR
+ INST_LANG, // $LANGUAGE
+ __INST_LAST
+ );
+ TVariableList = INST_0..__INST_LAST;
+ pstack_t = ^stack_t;
+ stack_t = record
+ next: pstack_t;
+ text: PChar;
+ end;
+
+var
+ g_stringsize: integer;
+ g_stacktop: ^pstack_t;
+ g_variables: PChar;
+ g_hwndParent: HWND;
+
+function PopString(): string;
+var
+ th: pstack_t;
+begin
+ if integer(g_stacktop^) <> 0 then begin
+ th := g_stacktop^;
+ Result := PChar(@th.text);
+ g_stacktop^ := th.next;
+ GlobalFree(HGLOBAL(th));
+ end;
+end;
+
+procedure PushString(const str: string='');
+var
+ th: pstack_t;
+begin
+ if integer(g_stacktop) <> 0 then begin
+ th := pstack_t(GlobalAlloc(GPTR, SizeOf(stack_t) + g_stringsize));
+ lstrcpyn(@th.text, PChar(str), g_stringsize);
+ th.next := g_stacktop^;
+ g_stacktop^ := th;
+ end;
+end;
+
+function GetUserVariable(const varnum: TVariableList): string;
+begin
+ if (integer(varnum) >= 0) and (integer(varnum) < integer(__INST_LAST)) then
+ Result := g_variables + integer(varnum) * g_stringsize
+ else
+ Result := '';
+end;
+
+procedure SetUserVariable(const varnum: TVariableList; const value: string);
+begin
+ if (value <> '') and (integer(varnum) >= 0) and (integer(varnum) < integer(__INST_LAST)) then
+ lstrcpy(g_variables + integer(varnum) * g_stringsize, PChar(value))
+end;
+
+procedure NSISDialog(const text, caption: string; const buttons: integer);
+begin
+ MessageBox(g_hwndParent, PChar(text), PChar(caption), buttons);
+end;
+
+procedure ex_dll(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer); cdecl;
+begin
+ // setup global variables
+ g_stringsize := string_size;
+ g_hwndParent := hwndParent;
+ g_stacktop := stacktop;
+ g_variables := variables;
+ // end global variable setup
+
+ NSISDialog(GetUserVariable(INST_0), 'The value of $0', MB_OK);
+ NSISDialog(PopString, 'pop', MB_OK);
+ PushString('Hello, this is a push');
+ SetUserVariable(INST_0, 'This is user var $0');
+end;
+
+exports ex_dll;
+
+begin
+end.
diff --git a/KattekerCreator/nsis/Examples/Plugin/exdll.dsp b/KattekerCreator/nsis/Examples/Plugin/exdll.dsp
new file mode 100644
index 0000000..9ff8fc2
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/exdll.dsp
@@ -0,0 +1,112 @@
+# Microsoft Developer Studio Project File - Name="exdll" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=exdll - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "exdll.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "exdll.mak" CFG="exdll - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "exdll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "exdll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "exdll - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O1 /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /D NSISCALL=__stdcall /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nsis\pluginapi.lib /nologo /entry:"DllMain" /dll /machine:I386 /nodefaultlib /out:"../../Plugins/exdll.dll" /opt:nowin98
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "exdll - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /D NSISCALL=__stdcall /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nsis\pluginapi.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "exdll - Win32 Release"
+# Name "exdll - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\exdll.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\nsis\pluginapi.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/KattekerCreator/nsis/Examples/Plugin/exdll.dsw b/KattekerCreator/nsis/Examples/Plugin/exdll.dsw
new file mode 100644
index 0000000..e8a07c1
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/exdll.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "exdll"=.\exdll.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/KattekerCreator/nsis/Examples/Plugin/exdll_with_unit.dpr b/KattekerCreator/nsis/Examples/Plugin/exdll_with_unit.dpr
new file mode 100644
index 0000000..1eb216b
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/exdll_with_unit.dpr
@@ -0,0 +1,93 @@
+{
+ NSIS ExDLL2 example
+ Original is ExDLL
+ (C) 2001 - Peter Windridge
+
+ Changed with delphi unit nsis.pas
+ by bernhard mayer
+
+ Tested in Delphi 7.0
+}
+
+// Example NSIS code
+{
+Section
+ exdll_with_unit::registerplugincallback
+
+ StrCpy $0 "Hello"
+ Push "World"
+ exdll_with_unit::pop_dlg_push
+ Pop $1
+ DetailPrint $$0=$0
+ DetailPrint $$1=$1
+
+ GetFunctionAddress $0 nsistest
+ Push $0
+ exdll_with_unit::callnsisfunc
+SectionEnd
+
+Function nsistest
+ DetailPrint "Hello from NSIS function"
+FunctionEnd
+}
+
+
+library exdll;
+
+uses
+ nsis, windows;
+
+
+procedure pop_dlg_push(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer); cdecl;
+begin
+ // set up global variables
+ Init(hwndParent, string_size, variables, stacktop);
+
+ NSISDialog(GetUserVariable(INST_0), 'The value of $0', MB_OK);
+ NSISDialog(PopString, 'pop', MB_OK);
+ PushString('Hello, this is a push');
+ SetUserVariable(INST_0, 'This is user var $0');
+end;
+
+
+procedure callnsisfunc(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer; const extraparameters: pointer); cdecl;
+var
+ FuncAddr : String;
+begin
+ Init(hwndParent, string_size, variables, stacktop, extraparameters);
+
+ FuncAddr := PopString();
+ Call(FuncAddr);
+end;
+
+
+function mynsiscallback(const NSPIM: TNSPIM): Pointer; cdecl;
+begin
+ Result := nil;
+ if NSPIM = NSPIM_UNLOAD then
+ begin
+ NSISDialog(PChar('NSPIM_UNLOAD is the final callback, goodbye...'), PChar('mynsiscallback'), MB_OK);
+ end;
+end;
+
+
+procedure registerplugincallback(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer; const extraparameters: pointer); cdecl;
+var
+ ThisDllInstance : HMODULE;
+begin
+ Init(hwndParent, string_size, variables, stacktop, extraparameters);
+
+ if g_extraparameters <> nil then
+ begin
+ ThisDllInstance := hInstance;
+ TRegisterPluginCallback(g_extraparameters.RegisterPluginCallback)(ThisDllInstance, @mynsiscallback);
+ end;
+end;
+
+
+exports pop_dlg_push;
+exports callnsisfunc;
+exports registerplugincallback;
+
+begin
+end.
diff --git a/KattekerCreator/nsis/Examples/Plugin/extdll.inc b/KattekerCreator/nsis/Examples/Plugin/extdll.inc
new file mode 100644
index 0000000..e3b7476
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/extdll.inc
@@ -0,0 +1,145 @@
+;################################################################
+; ExtDLL header for MASM32
+;
+; Author: Ramon
+;
+; Obs: This header must be included after windows.inc and kernel32.inc
+; because it need the prototypes for lstrcpy, lstrcpyn,
+; GlobalAlloc and GlobalFree
+;
+;################################################################
+stack_t struct
+ next dd ?
+ text dd ? ; 1 DUP(?) ; this should be the length of string_size
+stack_t ends
+
+.const
+; For page showing plug-ins
+WM_NOTIFY_OUTER_NEXT equ (WM_USER+0x8)
+WM_NOTIFY_CUSTOM_READY equ (WM_USER+0xd)
+NOTIFY_BYE_BYE equ 'x'
+
+INST_0 EQU 0 ; $0
+INST_1 EQU 1 ; $1
+INST_2 EQU 2 ; $2
+INST_3 EQU 3 ; $3
+INST_4 EQU 4 ; $4
+INST_5 EQU 5 ; $5
+INST_6 EQU 6 ; $6
+INST_7 EQU 7 ; $7
+INST_8 EQU 8 ; $8
+INST_9 EQU 9 ; $9
+INST_R0 EQU 10 ; $R0
+INST_R1 EQU 11 ; $R1
+INST_R2 EQU 12 ; $R2
+INST_R3 EQU 13 ; $R3
+INST_R4 EQU 14 ; $R4
+INST_R5 EQU 15 ; $R5
+INST_R6 EQU 16 ; $R6
+INST_R7 EQU 17 ; $R7
+INST_R8 EQU 18 ; $R8
+INST_R9 EQU 19 ; $R9
+INST_CMDLINE EQU 20 ; $CMDLINE
+INST_INSTDIR EQU 21 ; $INSTDIR
+INST_OUTDIR EQU 22 ; $OUTDIR
+INST_EXEDIR EQU 23 ; $EXEDIR
+INST_LANG EQU 24 ; $LANGUAGE
+__INST_LAST EQU 25
+
+.data?
+g_stringsize dd ?
+g_stacktop dd ?
+g_variables dd ?
+
+m2m MACRO M1, M2
+ push M2
+ pop M1
+ENDM
+
+EXDLL_INIT MACRO
+ m2m g_stringsize, string_size
+ m2m g_stacktop, stacktop
+ m2m g_variables, variables
+ENDM
+
+.code
+
+; utility functions (not required but often useful)
+popstring proc uses edi pStr:DWORD
+
+ LOCAL th:DWORD
+
+ mov edi, g_stacktop
+ cmp edi, 0
+ jz STACK_ERR
+ mov edi, [edi]
+ cmp edi, 0
+ jz STACK_ERR
+
+ ASSUME edi:PTR stack_t
+ invoke lstrcpy, pStr, ADDR [edi].text
+ mov th , edi
+ mov edi, [edi].next
+ mov eax, g_stacktop
+ mov [eax], edi
+ invoke GlobalFree, th
+ ASSUME edi:PTR NOTHING
+ mov eax, 0
+ ret
+
+STACK_ERR:
+ mov eax, 1
+ ret
+
+popstring endp
+
+pushstring proc uses edi pStr:DWORD
+
+ cmp g_stacktop, 0
+ jz STACK_ERR
+
+ mov eax, sizeof stack_t
+ add eax, g_stringsize
+ invoke GlobalAlloc, GPTR, eax
+
+ mov edi, eax
+ assume edi:PTR stack_t
+
+ invoke lstrcpyn, ADDR [edi].text, pStr, g_stringsize
+ mov eax, g_stacktop
+ push DWORD PTR[eax]
+ mov [eax], edi
+ pop eax
+ ;lea edi, [edi].next ; Not needed [edi].next == edi
+ mov DWORD PTR[edi], eax
+ ASSUME edi:PTR NOTHING
+
+STACK_ERR:
+ ret
+
+pushstring endp
+
+getuservariable proc varnum:DWORD
+
+ .if varnum < 0 || varnum >= __INST_LAST
+ xor eax, eax
+ .else
+ mov eax, varnum
+ imul eax, g_stringsize
+ add eax, g_variables
+ .endif
+ ret
+
+getuservariable endp
+
+setuservariable proc varnum:DWORD, var:DWORD
+
+ .if (var != NULL && varnum >= 0 && varnum < __INST_LAST)
+ mov eax, varnum
+ imul eax, g_stringsize
+ add eax, g_variables
+ invoke lstrcpy, eax, var
+ .endif
+ ret
+
+setuservariable endp
diff --git a/KattekerCreator/nsis/Examples/Plugin/nsis.pas b/KattekerCreator/nsis/Examples/Plugin/nsis.pas
new file mode 100644
index 0000000..444fcfd
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/nsis.pas
@@ -0,0 +1,209 @@
+{
+ Original Code from
+ (C) 2001 - Peter Windridge
+
+ Code in separate unit and some changes
+ 2003 by Bernhard Mayer
+
+ Fixed and formatted by Brett Dever
+ http://editor.nfscheats.com/
+
+ simply include this unit in your plugin project and export
+ functions as needed
+}
+
+unit nsis;
+
+interface
+
+uses
+ windows, CommCtrl, SysUtils;
+
+type
+ VarConstants = (
+ INST_0, // $0
+ INST_1, // $1
+ INST_2, // $2
+ INST_3, // $3
+ INST_4, // $4
+ INST_5, // $5
+ INST_6, // $6
+ INST_7, // $7
+ INST_8, // $8
+ INST_9, // $9
+ INST_R0, // $R0
+ INST_R1, // $R1
+ INST_R2, // $R2
+ INST_R3, // $R3
+ INST_R4, // $R4
+ INST_R5, // $R5
+ INST_R6, // $R6
+ INST_R7, // $R7
+ INST_R8, // $R8
+ INST_R9, // $R9
+ INST_CMDLINE, // $CMDLINE
+ INST_INSTDIR, // $INSTDIR
+ INST_OUTDIR, // $OUTDIR
+ INST_EXEDIR, // $EXEDIR
+ INST_LANG, // $LANGUAGE
+ __INST_LAST
+ );
+ TVariableList = INST_0..__INST_LAST;
+
+type
+ PluginCallbackMessages = (
+ NSPIM_UNLOAD, // This is the last message a plugin gets, do final cleanup
+ NSPIM_GUIUNLOAD // Called after .onGUIEnd
+ );
+ TNSPIM = NSPIM_UNLOAD..NSPIM_GUIUNLOAD;
+
+ //TPluginCallback = function (const NSPIM: Integer): Pointer; cdecl;
+
+ TExecuteCodeSegment = function (const funct_id: Integer; const parent: HWND): Integer; stdcall;
+ Tvalidate_filename = procedure (const filename: PChar); stdcall;
+ TRegisterPluginCallback = function (const DllInstance: HMODULE; const CallbackFunction: Pointer): Integer; stdcall;
+
+ pexec_flags_t = ^exec_flags_t;
+ exec_flags_t = record
+ autoclose: Integer;
+ all_user_var: Integer;
+ exec_error: Integer;
+ abort: Integer;
+ exec_reboot: Integer;
+ reboot_called: Integer;
+ XXX_cur_insttype: Integer;
+ plugin_api_version: Integer;
+ silent: Integer;
+ instdir_error: Integer;
+ rtl: Integer;
+ errlvl: Integer;
+ alter_reg_view: Integer;
+ status_update: Integer;
+ end;
+
+ pextrap_t = ^extrap_t;
+ extrap_t = record
+ exec_flags: Pointer; // exec_flags_t;
+ exec_code_segment: TExecuteCodeSegment; // TFarProc;
+ validate_filename: Pointer; // Tvalidate_filename;
+ RegisterPluginCallback: Pointer; //TRegisterPluginCallback;
+ end;
+
+ pstack_t = ^stack_t;
+ stack_t = record
+ next: pstack_t;
+ text: PChar;
+ end;
+
+var
+ g_stringsize: integer;
+ g_stacktop: ^pstack_t;
+ g_variables: PChar;
+ g_hwndParent: HWND;
+ g_hwndList: HWND;
+ g_hwndLogList: HWND;
+ g_extraparameters: pextrap_t;
+
+procedure Init(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer; const extraparameters: pointer = nil);
+
+function LogMessage(Msg : String): BOOL;
+function Call(NSIS_func : String) : Integer;
+function PopString(): string;
+procedure PushString(const str: string='');
+function GetUserVariable(const varnum: TVariableList): string;
+procedure SetUserVariable(const varnum: TVariableList; const value: string);
+procedure NSISDialog(const text, caption: string; const buttons: integer);
+
+implementation
+
+procedure Init(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer; const extraparameters: pointer = nil);
+begin
+ g_stringsize := string_size;
+ g_hwndParent := hwndParent;
+ g_stacktop := stacktop;
+ g_variables := variables;
+ g_hwndList := FindWindowEx(FindWindowEx(g_hwndParent, 0, '#32770', nil), 0,'SysListView32', nil);
+ g_extraparameters := extraparameters;
+end;
+
+
+function Call(NSIS_func : String) : Integer;
+var
+ codeoffset: Integer; //The ID of nsis function
+begin
+ Result := 0;
+ codeoffset := StrToIntDef(NSIS_func, 0);
+ if (codeoffset <> 0) and (g_extraparameters <> nil) then
+ begin
+ codeoffset := codeoffset - 1;
+ Result := g_extraparameters.exec_code_segment(codeoffset, g_hwndParent);
+ end;
+end;
+
+function LogMessage(Msg : String): BOOL;
+var
+ ItemCount : Integer;
+ item: TLVItem;
+begin
+ Result := FAlse;
+ if g_hwndList = 0 then exit;
+ FillChar( item, sizeof(item), 0 );
+ ItemCount := SendMessage(g_hwndList, LVM_GETITEMCOUNT, 0, 0);
+ item.iItem := ItemCount;
+ item.mask := LVIF_TEXT;
+ item.pszText := PChar(Msg);
+ ListView_InsertItem(g_hwndList, item);
+ ListView_EnsureVisible(g_hwndList, ItemCount, TRUE);
+end;
+
+function PopString(): string;
+var
+ th: pstack_t;
+begin
+ if integer(g_stacktop^) <> 0 then begin
+ th := g_stacktop^;
+ Result := PChar(@th.text);
+ g_stacktop^ := th.next;
+ GlobalFree(HGLOBAL(th));
+ end;
+end;
+
+procedure PushString(const str: string='');
+var
+ th: pstack_t;
+begin
+ if integer(g_stacktop) <> 0 then begin
+ th := pstack_t(GlobalAlloc(GPTR, SizeOf(stack_t) + g_stringsize));
+ lstrcpyn(@th.text, PChar(str), g_stringsize);
+ th.next := g_stacktop^;
+ g_stacktop^ := th;
+ end;
+end;
+
+function GetUserVariable(const varnum: TVariableList): string;
+begin
+ if (integer(varnum) >= 0) and (integer(varnum) < integer(__INST_LAST)) then
+ Result := g_variables + integer(varnum) * g_stringsize
+ else
+ Result := '';
+end;
+
+procedure SetUserVariable(const varnum: TVariableList; const value: string);
+begin
+ if (value <> '') and (integer(varnum) >= 0) and (integer(varnum) < integer(__INST_LAST)) then
+ lstrcpy(g_variables + integer(varnum) * g_stringsize, PChar(value))
+end;
+
+procedure NSISDialog(const text, caption: string; const buttons: integer);
+var
+ hwndOwner: HWND;
+begin
+ hwndOwner := g_hwndParent;
+ if not IsWindow(g_hwndParent) then hwndOwner := 0; // g_hwndParent is not valid in NSPIM_[GUI]UNLOAD
+ MessageBox(hwndOwner, PChar(text), PChar(caption), buttons);
+end;
+
+begin
+
+end.
+
diff --git a/KattekerCreator/nsis/Examples/Plugin/nsis/api.h b/KattekerCreator/nsis/Examples/Plugin/nsis/api.h
new file mode 100644
index 0000000..eebbbf0
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/nsis/api.h
@@ -0,0 +1,85 @@
+/*
+ * apih
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2018 Nullsoft and Contributors
+ *
+ * Licensed under the zlib/libpng license (the "License");
+ * you may not use this file except in compliance with the License.
+ *
+ * Licence details can be found in the file COPYING.
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+#ifndef _NSIS_EXEHEAD_API_H_
+#define _NSIS_EXEHEAD_API_H_
+
+// Starting with NSIS 2.42, you can check the version of the plugin API in exec_flags->plugin_api_version
+// The format is 0xXXXXYYYY where X is the major version and Y is the minor version (MAKELONG(y,x))
+// When doing version checks, always remember to use >=, ex: if (pX->exec_flags->plugin_api_version >= NSISPIAPIVER_1_0) {}
+
+#define NSISPIAPIVER_1_0 0x00010000
+#define NSISPIAPIVER_CURR NSISPIAPIVER_1_0
+
+// NSIS Plug-In Callback Messages
+enum NSPIM
+{
+ NSPIM_UNLOAD, // This is the last message a plugin gets, do final cleanup
+ NSPIM_GUIUNLOAD, // Called after .onGUIEnd
+};
+
+// Prototype for callbacks registered with extra_parameters->RegisterPluginCallback()
+// Return NULL for unknown messages
+// Should always be __cdecl for future expansion possibilities
+typedef UINT_PTR (*NSISPLUGINCALLBACK)(enum NSPIM);
+
+// extra_parameters data structure containing other interesting stuff
+// besides the stack, variables and HWND passed on to plug-ins.
+typedef struct
+{
+ int autoclose; // SetAutoClose
+ int all_user_var; // SetShellVarContext: User context = 0, Machine context = 1
+ int exec_error; // IfErrors
+ int abort; // IfAbort
+ int exec_reboot; // IfRebootFlag (NSIS_SUPPORT_REBOOT)
+ int reboot_called; // NSIS_SUPPORT_REBOOT
+ int XXX_cur_insttype; // Deprecated
+ int plugin_api_version; // Plug-in ABI. See NSISPIAPIVER_CURR (Note: used to be XXX_insttype_changed)
+ int silent; // IfSilent (NSIS_CONFIG_SILENT_SUPPORT)
+ int instdir_error; // GetInstDirError
+ int rtl; // 1 if $LANGUAGE is a RTL language
+ int errlvl; // SetErrorLevel
+ int alter_reg_view; // SetRegView: Default View = 0, Alternative View = (sizeof(void*) > 4 ? KEY_WOW64_32KEY : KEY_WOW64_64KEY)
+ int status_update; // SetDetailsPrint
+} exec_flags_t;
+
+#ifndef NSISCALL
+# define NSISCALL __stdcall
+#endif
+#if !defined(_WIN32) && !defined(LPTSTR)
+# define LPTSTR TCHAR*
+#endif
+
+typedef struct {
+ exec_flags_t *exec_flags;
+ int (NSISCALL *ExecuteCodeSegment)(int, HWND);
+ void (NSISCALL *validate_filename)(LPTSTR);
+ int (NSISCALL *RegisterPluginCallback)(HMODULE, NSISPLUGINCALLBACK); // returns 0 on success, 1 if already registered and < 0 on errors
+} extra_parameters;
+
+// Definitions for page showing plug-ins
+// See Ui.c to understand better how they're used
+
+// sent to the outer window to tell it to go to the next inner window
+#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
+
+// custom pages should send this message to let NSIS know they're ready
+#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
+
+// sent as wParam with WM_NOTIFY_OUTER_NEXT when user cancels - heed its warning
+#define NOTIFY_BYE_BYE 'x'
+
+#endif /* _NSIS_EXEHEAD_API_H_ */
diff --git a/KattekerCreator/nsis/Examples/Plugin/nsis/nsis_tchar.h b/KattekerCreator/nsis/Examples/Plugin/nsis/nsis_tchar.h
new file mode 100644
index 0000000..3f105ba
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/nsis/nsis_tchar.h
@@ -0,0 +1,229 @@
+/*
+ * nsis_tchar.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2018 Nullsoft and Contributors
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ *
+ * For Unicode support by Jim Park -- 08/30/2007
+ */
+
+// Jim Park: Only those we use are listed here.
+
+#pragma once
+
+#ifdef _UNICODE
+
+#ifndef _T
+#define __T(x) L ## x
+#define _T(x) __T(x)
+#define _TEXT(x) __T(x)
+#endif
+
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+#if !defined(_NATIVE_WCHAR_T_DEFINED) && !defined(_WCHAR_T_DEFINED)
+typedef unsigned short TCHAR;
+#else
+typedef wchar_t TCHAR;
+#endif
+#endif
+
+
+// program
+#define _tenviron _wenviron
+#define __targv __wargv
+
+// printfs
+#define _ftprintf fwprintf
+#define _sntprintf _snwprintf
+#if (defined(_MSC_VER) && (_MSC_VER<=1310||_MSC_FULL_VER<=140040310)) || defined(__MINGW32__)
+# define _stprintf swprintf
+#else
+# define _stprintf _swprintf
+#endif
+#define _tprintf wprintf
+#define _vftprintf vfwprintf
+#define _vsntprintf _vsnwprintf
+#if defined(_MSC_VER) && (_MSC_VER<=1310)
+# define _vstprintf vswprintf
+#else
+# define _vstprintf _vswprintf
+#endif
+
+// scanfs
+#define _tscanf wscanf
+#define _stscanf swscanf
+
+// string manipulations
+#define _tcscat wcscat
+#define _tcschr wcschr
+#define _tcsclen wcslen
+#define _tcscpy wcscpy
+#define _tcsdup _wcsdup
+#define _tcslen wcslen
+#define _tcsnccpy wcsncpy
+#define _tcsncpy wcsncpy
+#define _tcsrchr wcsrchr
+#define _tcsstr wcsstr
+#define _tcstok wcstok
+
+// string comparisons
+#define _tcscmp wcscmp
+#define _tcsicmp _wcsicmp
+#define _tcsncicmp _wcsnicmp
+#define _tcsncmp wcsncmp
+#define _tcsnicmp _wcsnicmp
+
+// upper / lower
+#define _tcslwr _wcslwr
+#define _tcsupr _wcsupr
+#define _totlower towlower
+#define _totupper towupper
+
+// conversions to numbers
+#define _tcstoi64 _wcstoi64
+#define _tcstol wcstol
+#define _tcstoul wcstoul
+#define _tstof _wtof
+#define _tstoi _wtoi
+#define _tstoi64 _wtoi64
+#define _ttoi _wtoi
+#define _ttoi64 _wtoi64
+#define _ttol _wtol
+
+// conversion from numbers to strings
+#define _itot _itow
+#define _ltot _ltow
+#define _i64tot _i64tow
+#define _ui64tot _ui64tow
+
+// file manipulations
+#define _tfopen _wfopen
+#define _topen _wopen
+#define _tremove _wremove
+#define _tunlink _wunlink
+
+// reading and writing to i/o
+#define _fgettc fgetwc
+#define _fgetts fgetws
+#define _fputts fputws
+#define _gettchar getwchar
+
+// directory
+#define _tchdir _wchdir
+
+// environment
+#define _tgetenv _wgetenv
+#define _tsystem _wsystem
+
+// time
+#define _tcsftime wcsftime
+
+#else // ANSI
+
+#ifndef _T
+#define _T(x) x
+#define _TEXT(x) x
+#endif
+
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+typedef char TCHAR;
+#endif
+
+// program
+#define _tenviron environ
+#define __targv __argv
+
+// printfs
+#define _ftprintf fprintf
+#define _sntprintf _snprintf
+#define _stprintf sprintf
+#define _tprintf printf
+#define _vftprintf vfprintf
+#define _vsntprintf _vsnprintf
+#define _vstprintf vsprintf
+
+// scanfs
+#define _tscanf scanf
+#define _stscanf sscanf
+
+// string manipulations
+#define _tcscat strcat
+#define _tcschr strchr
+#define _tcsclen strlen
+#define _tcscnlen strnlen
+#define _tcscpy strcpy
+#define _tcsdup _strdup
+#define _tcslen strlen
+#define _tcsnccpy strncpy
+#define _tcsrchr strrchr
+#define _tcsstr strstr
+#define _tcstok strtok
+
+// string comparisons
+#define _tcscmp strcmp
+#define _tcsicmp _stricmp
+#define _tcsncmp strncmp
+#define _tcsncicmp _strnicmp
+#define _tcsnicmp _strnicmp
+
+// upper / lower
+#define _tcslwr _strlwr
+#define _tcsupr _strupr
+
+#define _totupper toupper
+#define _totlower tolower
+
+// conversions to numbers
+#define _tcstol strtol
+#define _tcstoul strtoul
+#define _tstof atof
+#define _tstoi atoi
+#define _tstoi64 _atoi64
+#define _tstoi64 _atoi64
+#define _ttoi atoi
+#define _ttoi64 _atoi64
+#define _ttol atol
+
+// conversion from numbers to strings
+#define _i64tot _i64toa
+#define _itot _itoa
+#define _ltot _ltoa
+#define _ui64tot _ui64toa
+
+// file manipulations
+#define _tfopen fopen
+#define _topen _open
+#define _tremove remove
+#define _tunlink _unlink
+
+// reading and writing to i/o
+#define _fgettc fgetc
+#define _fgetts fgets
+#define _fputts fputs
+#define _gettchar getchar
+
+// directory
+#define _tchdir _chdir
+
+// environment
+#define _tgetenv getenv
+#define _tsystem system
+
+// time
+#define _tcsftime strftime
+
+#endif
+
+// is functions (the same in Unicode / ANSI)
+#define _istgraph isgraph
+#define _istascii __isascii
+
+#define __TFILE__ _T(__FILE__)
+#define __TDATE__ _T(__DATE__)
+#define __TTIME__ _T(__TIME__)
diff --git a/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi-x86-ansi.lib b/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi-x86-ansi.lib
new file mode 100644
index 0000000..23a42fd
Binary files /dev/null and b/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi-x86-ansi.lib differ
diff --git a/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi-x86-unicode.lib b/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi-x86-unicode.lib
new file mode 100644
index 0000000..a818e0e
Binary files /dev/null and b/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi-x86-unicode.lib differ
diff --git a/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi.h b/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi.h
new file mode 100644
index 0000000..63fe790
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Plugin/nsis/pluginapi.h
@@ -0,0 +1,108 @@
+#ifndef ___NSIS_PLUGIN__H___
+#define ___NSIS_PLUGIN__H___
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "api.h"
+#include "nsis_tchar.h" // BUGBUG: Why cannot our plugins use the compilers tchar.h?
+
+#ifndef NSISCALL
+# define NSISCALL WINAPI
+#endif
+
+#define EXDLL_INIT() { \
+ g_stringsize=string_size; \
+ g_stacktop=stacktop; \
+ g_variables=variables; }
+
+typedef struct _stack_t {
+ struct _stack_t *next;
+#ifdef UNICODE
+ WCHAR text[1]; // this should be the length of g_stringsize when allocating
+#else
+ char text[1];
+#endif
+} stack_t;
+
+enum
+{
+INST_0, // $0
+INST_1, // $1
+INST_2, // $2
+INST_3, // $3
+INST_4, // $4
+INST_5, // $5
+INST_6, // $6
+INST_7, // $7
+INST_8, // $8
+INST_9, // $9
+INST_R0, // $R0
+INST_R1, // $R1
+INST_R2, // $R2
+INST_R3, // $R3
+INST_R4, // $R4
+INST_R5, // $R5
+INST_R6, // $R6
+INST_R7, // $R7
+INST_R8, // $R8
+INST_R9, // $R9
+INST_CMDLINE, // $CMDLINE
+INST_INSTDIR, // $INSTDIR
+INST_OUTDIR, // $OUTDIR
+INST_EXEDIR, // $EXEDIR
+INST_LANG, // $LANGUAGE
+__INST_LAST
+};
+
+extern unsigned int g_stringsize;
+extern stack_t **g_stacktop;
+extern LPTSTR g_variables;
+
+void NSISCALL pushstring(LPCTSTR str);
+void NSISCALL pushintptr(INT_PTR value);
+#define pushint(v) pushintptr((INT_PTR)(v))
+int NSISCALL popstring(LPTSTR str); // 0 on success, 1 on empty stack
+int NSISCALL popstringn(LPTSTR str, int maxlen); // with length limit, pass 0 for g_stringsize
+INT_PTR NSISCALL popintptr();
+#define popint() ( (int) popintptr() )
+int NSISCALL popint_or(); // with support for or'ing (2|4|8)
+INT_PTR NSISCALL nsishelper_str_to_ptr(LPCTSTR s);
+#define myatoi(s) ( (int) nsishelper_str_to_ptr(s) ) // converts a string to an integer
+unsigned int NSISCALL myatou(LPCTSTR s); // converts a string to an unsigned integer, decimal only
+int NSISCALL myatoi_or(LPCTSTR s); // with support for or'ing (2|4|8)
+LPTSTR NSISCALL getuservariable(const int varnum);
+void NSISCALL setuservariable(const int varnum, LPCTSTR var);
+
+#ifdef UNICODE
+#define PopStringW(x) popstring(x)
+#define PushStringW(x) pushstring(x)
+#define SetUserVariableW(x,y) setuservariable(x,y)
+
+int NSISCALL PopStringA(LPSTR ansiStr);
+void NSISCALL PushStringA(LPCSTR ansiStr);
+void NSISCALL GetUserVariableW(const int varnum, LPWSTR wideStr);
+void NSISCALL GetUserVariableA(const int varnum, LPSTR ansiStr);
+void NSISCALL SetUserVariableA(const int varnum, LPCSTR ansiStr);
+
+#else
+// ANSI defs
+
+#define PopStringA(x) popstring(x)
+#define PushStringA(x) pushstring(x)
+#define SetUserVariableA(x,y) setuservariable(x,y)
+
+int NSISCALL PopStringW(LPWSTR wideStr);
+void NSISCALL PushStringW(LPWSTR wideStr);
+void NSISCALL GetUserVariableW(const int varnum, LPWSTR wideStr);
+void NSISCALL GetUserVariableA(const int varnum, LPSTR ansiStr);
+void NSISCALL SetUserVariableW(const int varnum, LPCWSTR wideStr);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif//!___NSIS_PLUGIN__H___
diff --git a/KattekerCreator/nsis/Examples/Splash/Example.nsi b/KattekerCreator/nsis/Examples/Splash/Example.nsi
new file mode 100644
index 0000000..2cc62b5
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/Splash/Example.nsi
@@ -0,0 +1,21 @@
+Name "Splash.dll test"
+
+OutFile "Splash Test.exe"
+
+XPStyle on
+
+Function .onInit
+ # the plugins dir is automatically deleted when the installer exits
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Wizard\orange-nsis.bmp"
+ #optional
+ #File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav"
+
+ splash::show 1000 $PLUGINSDIR\splash
+
+ Pop $0 ; $0 has '1' if the user closed the splash screen early,
+ ; '0' if everything closed normally, and '-1' if some error occurred.
+FunctionEnd
+
+Section
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/StartMenu/Example.nsi b/KattekerCreator/nsis/Examples/StartMenu/Example.nsi
new file mode 100644
index 0000000..c5c9d04
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/StartMenu/Example.nsi
@@ -0,0 +1,50 @@
+Name "StartMenu.dll test"
+
+OutFile "StartMenu Test.exe"
+
+XPStyle on
+
+Page directory
+DirText "This installer will create some shortcuts to MakeNSIS in the start menu.$\nFor this it needs NSIS's path." \
+ "Please specify the path in which you have installed NSIS:"
+InstallDir "${NSISDIR}"
+Function .onVerifyInstDir
+ IfFileExists $INSTDIR\makensis.exe +2
+ Abort
+FunctionEnd
+
+Page custom StartMenuGroupSelect "" ": Start Menu Folder"
+Function StartMenuGroupSelect
+ Push $R1
+
+ StartMenu::Select /checknoshortcuts "Don't create a start menu folder" /autoadd /lastused $R0 "StartMenu.dll test"
+ Pop $R1
+
+ StrCmp $R1 "success" success
+ StrCmp $R1 "cancel" done
+ ; error
+ MessageBox MB_OK $R1
+ StrCpy $R0 "StartMenu.dll test" # use default
+ Return
+ success:
+ Pop $R0
+
+ done:
+ Pop $R1
+FunctionEnd
+
+Page instfiles
+Section
+ # this part is only necessary if you used /checknoshortcuts
+ StrCpy $R1 $R0 1
+ StrCmp $R1 ">" skip
+
+ CreateDirectory $SMPROGRAMS\$R0
+ CreateShortcut $SMPROGRAMS\$R0\MakeNSISw.lnk $INSTDIR\makensisw.exe
+
+ SetShellVarContext All
+ CreateDirectory $SMPROGRAMS\$R0
+ CreateShortcut "$SMPROGRAMS\$R0\All users MakeNSISw.lnk" $INSTDIR\makensisw.exe
+
+ skip:
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/StrFunc.nsi b/KattekerCreator/nsis/Examples/StrFunc.nsi
new file mode 100644
index 0000000..f0df353
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/StrFunc.nsi
@@ -0,0 +1,635 @@
+Name "NSIS StrFunc Example"
+OutFile "StrFunc.exe"
+ShowInstDetails show
+ShowUninstDetails show
+XPStyle on
+RequestExecutionLevel user
+
+!include "StrFunc.nsh"
+
+# Declare used functions
+${StrCase}
+${StrClb}
+${StrIOToNSIS}
+${StrLoc}
+${StrNSISToIO}
+${StrRep}
+${StrStr}
+${StrStrAdv}
+${StrTok}
+${StrTrimNewLines}
+${StrSort}
+
+${UnStrCase}
+${UnStrClb}
+${UnStrIOToNSIS}
+${UnStrLoc}
+${UnStrNSISToIO}
+${UnStrRep}
+${UnStrStr}
+${UnStrStrAdv}
+${UnStrTok}
+${UnStrTrimNewLines}
+${UnStrSort}
+
+!macro StackVerificationStart
+ StrCpy $0 S0
+ StrCpy $1 S1
+ StrCpy $2 S2
+ StrCpy $3 S3
+ StrCpy $4 S4
+ StrCpy $5 S5
+ StrCpy $6 S6
+ StrCpy $7 S7
+ StrCpy $8 S8
+ StrCpy $9 S9
+ StrCpy $R0 SR0
+ StrCpy $R1 SR1
+ StrCpy $R2 SR2
+ StrCpy $R3 SR3
+ StrCpy $R4 SR4
+ StrCpy $R5 SR5
+ StrCpy $R6 SR6
+ StrCpy $R7 SR7
+ StrCpy $R8 SR8
+ StrCpy $R9 SR9
+!macroend
+
+!macro StackVerificationEnd
+ ClearErrors
+ ${If} $1 != "S1"
+ ${OrIf} $2 != "S2"
+ ${OrIf} $3 != "S3"
+ ${OrIf} $4 != "S4"
+ ${OrIf} $5 != "S5"
+ ${OrIf} $6 != "S6"
+ ${OrIf} $7 != "S7"
+ ${OrIf} $8 != "S8"
+ ${OrIf} $9 != "S9"
+ ${OrIf} $R0 != "SR0"
+ ${OrIf} $R1 != "SR1"
+ ${OrIf} $R2 != "SR2"
+ ${OrIf} $R3 != "SR3"
+ ${OrIf} $R4 != "SR4"
+ ${OrIf} $R5 != "SR5"
+ ${OrIf} $R6 != "SR6"
+ ${OrIf} $R7 != "SR7"
+ ${OrIf} $R8 != "SR8"
+ ${OrIf} $R9 != "SR9"
+ SetErrors
+ ${EndIf}
+!macroend
+
+Section
+
+ # Test case conversion
+ !insertmacro StackVerificationStart
+ ${StrCase} $0 "This is just an example. A very simple one." ""
+ StrCmp $0 "This is just an example. A very simple one." 0 strcaseerror
+ ${StrCase} $0 "THIS IS JUST AN EXAMPLE. A VERY SIMPLE ONE." "S"
+ StrCmp $0 "This is just an example. A very simple one." 0 strcaseerror
+ ${StrCase} $0 "This is just an example. A very simple one." "L"
+ StrCmp $0 "this is just an example. a very simple one." 0 strcaseerror
+ ${StrCase} $0 "This is just an example. A very simple one." "U"
+ StrCmp $0 "THIS IS JUST AN EXAMPLE. A VERY SIMPLE ONE." 0 strcaseerror
+ ${StrCase} $0 "This is just an example. A very simple one." "T"
+ StrCmp $0 "This Is Just An Example. A Very Simple One." 0 strcaseerror
+ ${StrCase} $0 "This is just an example. A very simple one." "<>"
+ StrCmp $0 "tHIS IS JUST AN EXAMPLE. a VERY SIMPLE ONE." 0 strcaseerror
+ ${StrCase} $0 "123456789!@#%^&*()-_=+[]{};:,./<>?" "S"
+ StrCmp $0 "123456789!@#%^&*()-_=+[]{};:,./<>?" 0 strcaseerror
+ ${StrCase} $0 "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#%^&*()abcdefghijklmnopqrstuvwxyz-_=+[]{};:,./<>?" "<>"
+ StrCmp $0 "123456789abcdefghijklmnopqrstuvwxyz!@#%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ-_=+[]{};:,./<>?" 0 strcaseerror
+ ${StrCase} $0 "what about taking a shower tomorrow? it's late to do so now! try to sleep now. Good Night!" "S"
+ StrCmp $0 "What about taking a shower tomorrow? It's late to do so now! Try to sleep now. Good night!" 0 strcaseerror
+ !insertmacro StackVerificationEnd
+ IfErrors strcaseerror
+
+ DetailPrint "PASSED StrCase test"
+ Goto +2
+strcaseerror:
+ DetailPrint "FAILED StrCase test"
+
+ # Test clipboard function
+ !insertmacro StackVerificationStart
+ ${StrClb} $0 "StrFunc clipboard test" ">"
+ StrCmp $0 "" 0 strclberror
+ ${StrClb} $0 "StrFunc clipboard test #2" "<>"
+ StrCmp $0 "StrFunc clipboard test" 0 strclberror
+ ${StrClb} $0 "" "<"
+ StrCmp $0 "StrFunc clipboard test #2" 0 strclberror
+ ${StrClb} $0 "" ""
+ StrCmp $0 "" 0 strclberror
+ !insertmacro StackVerificationEnd
+ IfErrors strclberror
+
+ DetailPrint "PASSED StrClb test"
+ Goto +2
+strclberror:
+ DetailPrint "FAILED StrClb test"
+
+ # Test IO functions
+ !insertmacro StackVerificationStart
+ !macro testio str
+ ${StrNSISToIO} $0 "${str}"
+ ${StrIOToNSIS} $0 $0
+ StrCmp $0 "${str}" 0 ioerror
+ !macroend
+ !insertmacro testio "$\rtest$\n"
+ !insertmacro testio "test$\n"
+ !insertmacro testio "$\rtest"
+ !insertmacro testio "test"
+ !insertmacro testio "$\r\$\t$\n"
+ !insertmacro testio "$\r \ $\t $\n $$"
+ !insertmacro testio ""
+ !insertmacro testio " "
+ !insertmacro StackVerificationEnd
+ IfErrors ioerror
+
+ DetailPrint "PASSED StrNSISToIO/StrIOToNSIS test"
+ Goto +2
+ioerror:
+ DetailPrint "FAILED StrNSISToIO/StrIOToNSIS test"
+
+ # Test string search functions
+ !insertmacro StackVerificationStart
+ ${StrLoc} $0 "This is just an example" "just" "<"
+ StrCmp $0 "11" 0 strlocerror
+ ${StrLoc} $0 a abc <
+ StrCmp $0 "" 0 strlocerror
+ ${StrLoc} $0 a abc >
+ StrCmp $0 "" 0 strlocerror
+ ${StrLoc} $0 abc a >
+ StrCmp $0 "0" 0 strlocerror
+ ${StrLoc} $0 abc b >
+ StrCmp $0 "1" 0 strlocerror
+ ${StrLoc} $0 abc c >
+ StrCmp $0 "2" 0 strlocerror
+ ${StrLoc} $0 abc a <
+ StrCmp $0 "2" 0 strlocerror
+ ${StrLoc} $0 abc b <
+ StrCmp $0 "1" 0 strlocerror
+ ${StrLoc} $0 abc c <
+ StrCmp $0 "0" 0 strlocerror
+ ${StrLoc} $0 abc d <
+ StrCmp $0 "" 0 strlocerror
+ !insertmacro StackVerificationEnd
+ IfErrors strlocerror
+
+ DetailPrint "PASSED StrLoc test"
+ Goto +2
+strlocerror:
+ DetailPrint "FAILED StrLoc test"
+
+ # Test string replacement
+ !insertmacro StackVerificationStart
+ ${StrRep} $0 "This is just an example" "an" "one"
+ StrCmp $0 "This is just one example" 0 strreperror
+ ${StrRep} $0 "test... test... 1 2 3..." "test" "testing"
+ StrCmp $0 "testing... testing... 1 2 3..." 0 strreperror
+ ${StrRep} $0 "" "test" "testing"
+ StrCmp $0 "" 0 strreperror
+ ${StrRep} $0 "test" "test" "testing"
+ StrCmp $0 "testing" 0 strreperror
+ ${StrRep} $0 "test" "test" ""
+ StrCmp $0 "" 0 strreperror
+ ${StrRep} $0 "test" "" "abc"
+ StrCmp $0 "test" 0 strreperror
+ ${StrRep} $0 "test" "" ""
+ StrCmp $0 "test" 0 strreperror
+ !insertmacro StackVerificationEnd
+ IfErrors strreperror
+
+ DetailPrint "PASSED StrRep test"
+ Goto +2
+strreperror:
+ DetailPrint "FAILED StrRep test"
+
+ # Test sorting
+ !insertmacro StackVerificationStart
+ ${StrSort} $0 "This is just an example" "" " just" "ple" "0" "0" "0"
+ StrCmp $0 "This is an exam" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "j" " " "0" "" "0"
+ StrCmp $0 "just" 0 strsorterror
+ ${StrSort} $0 "This is just an example" "" "j" "" "0" "1" "0"
+ StrCmp $0 "This is just an example" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "us" "" "0" "1" "0"
+ StrCmp $0 "just an example" 0 strsorterror
+ ${StrSort} $0 "This is just an example" "" "u" " " "0" "1" "0"
+ StrCmp $0 "This is just" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "just" " " "0" "1" "0"
+ StrCmp $0 "just" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "t" " " "0" "1" "0"
+ StrCmp $0 "This" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "le" " " "0" "1" "0"
+ StrCmp $0 "example" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "le" " " "1" "0" "0"
+ StrCmp $0 " examp" 0 strsorterror
+ ${StrSort} $0 "an error has occurred" " " "e" " " "0" "1" "0"
+ StrCmp $0 "error" 0 strsorterror
+ ${StrSort} $0 "" " " "something" " " "0" "1" "0"
+ StrCmp $0 "" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "j" " " "" "" ""
+ StrCmp $0 " just " 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "j" " " "1" "0" "1"
+ StrCmp $0 " ust " 0 strsorterror
+ ${StrSort} $0 "This is just an example" "" "j" "" "0" "0" "1"
+ StrCmp $0 "This is ust an example" 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "us" "" "1" "0" "0"
+ StrCmp $0 " jt an example" 0 strsorterror
+ ${StrSort} $0 "This is just an example" "" "u" " " "0" "0" "1"
+ StrCmp $0 "This is jst " 0 strsorterror
+ ${StrSort} $0 "This is just an example" " " "just" " " "1" "0" "1"
+ StrCmp $0 " " 0 strsorterror
+ ${StrSort} $0 "an error has occurred" " " "e" "h" "1" "0" "0"
+ StrCmp $0 " rror " 0 strsorterror
+ ${StrSort} $0 "" " " "something" " " "1" "0" "1"
+ StrCmp $0 "" 0 strsorterror
+ !insertmacro StackVerificationEnd
+ IfErrors strsorterror
+
+ DetailPrint "PASSED StrSort test"
+ Goto +2
+strsorterror:
+ DetailPrint "FAILED StrSort test"
+
+ !insertmacro StackVerificationStart
+ ${StrStr} $0 "abcefghijklmnopqrstuvwxyz" "g"
+ StrCmp $0 "ghijklmnopqrstuvwxyz" 0 strstrerror
+ ${StrStr} $0 "abcefghijklmnopqrstuvwxyz" "ga"
+ StrCmp $0 "" 0 strstrerror
+ ${StrStr} $0 "abcefghijklmnopqrstuvwxyz" ""
+ StrCmp $0 "abcefghijklmnopqrstuvwxyz" 0 strstrerror
+ ${StrStr} $0 "a" "abcefghijklmnopqrstuvwxyz"
+ StrCmp $0 "" 0 strstrerror
+ !insertmacro StackVerificationEnd
+ IfErrors strstrerror
+
+ DetailPrint "PASSED StrStr test"
+ Goto +2
+strstrerror:
+ DetailPrint "FAILED StrStr test"
+
+ !insertmacro StackVerificationStart
+ ${StrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "0" "0"
+ StrCmp $0 "abcabcabc" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "1" "0"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "2" "0"
+ StrCmp $0 "abc" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "3" "0"
+ StrCmp $0 "" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "abc" ">" "<" "1" "1" "0"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "abc" ">" "<" "0" "1" "0"
+ StrCmp $0 "abc" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "abc" "<" "<" "1" "0" "0"
+ StrCmp $0 "abcabcabc" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "abc" "<" "<" "0" "0" "0"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "abc" "<" ">" "0" "0" "0"
+ StrCmp $0 "" 0 strstradverror
+ ${StrStrAdv} $0 "abcabcabc" "abc" "<" ">" "0" "1" "0"
+ StrCmp $0 "abc" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "0" "1"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "1" "1"
+ StrCmp $0 "abc" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "2" "1"
+ StrCmp $0 "" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "3" "1"
+ StrCmp $0 "" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "abc" ">" "<" "1" "1" "1"
+ StrCmp $0 "ABCabcabc" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "abc" ">" "<" "0" "1" "1"
+ StrCmp $0 "ABCabc" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "abc" "<" "<" "1" "0" "1"
+ StrCmp $0 "ABCabcabc" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "abc" "<" "<" "0" "0" "1"
+ StrCmp $0 "ABCabc" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "0" "1"
+ StrCmp $0 "" 0 strstradverror
+ ${StrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "1" "1"
+ StrCmp $0 "abc" 0 strstradverror
+ !insertmacro StackVerificationEnd
+ IfErrors strstradverror
+
+ DetailPrint "PASSED StrStrAdv test"
+ Goto +2
+strstradverror:
+ DetailPrint "FAILED StrStrAdv test"
+
+ # Test tokenizer
+ !insertmacro StackVerificationStart
+ ${StrTok} $0 "This is, or is not, just an example" " ," "4" "1"
+ StrCmp $0 "not" 0 strtokerror
+ ${StrTok} $0 "This is, or is not, just an example" " ," "4" "0"
+ StrCmp $0 "is" 0 strtokerror
+ ${StrTok} $0 "This is, or is not, just an example" " ," "152" "0"
+ StrCmp $0 "" 0 strtokerror
+ ${StrTok} $0 "This is, or is not, just an example" " ," "" "0"
+ StrCmp $0 "example" 0 strtokerror
+ ${StrTok} $0 "This is, or is not, just an example" " ," "L" "0"
+ StrCmp $0 "example" 0 strtokerror
+ ${StrTok} $0 "This is, or is not, just an example" " ," "0" "0"
+ StrCmp $0 "This" 0 strtokerror
+ !insertmacro StackVerificationEnd
+ IfErrors strtokerror
+
+ DetailPrint "PASSED StrTok test"
+ Goto +2
+strtokerror:
+ DetailPrint "FAILED StrTok test"
+
+ # Test trim new lines
+ !insertmacro StackVerificationStart
+ ${StrTrimNewLines} $0 "$\r$\ntest$\r$\ntest$\r$\n"
+ StrCmp $0 "$\r$\ntest$\r$\ntest" 0 strtrimnewlineserror
+ !insertmacro StackVerificationEnd
+ IfErrors strtrimnewlineserror
+
+ DetailPrint "PASSED StrTrimNewLines test"
+ Goto +2
+strtrimnewlineserror:
+ DetailPrint "FAILED StrTrimNewLines test"
+
+ WriteUninstaller $EXEDIR\UnStrFunc.exe
+
+ Exec $EXEDIR\UnStrFunc.exe
+
+SectionEnd
+
+Section Uninstall
+
+ # Test case conversion
+ !insertmacro StackVerificationStart
+ ${UnStrCase} $0 "This is just an example. A very simple one." ""
+ StrCmp $0 "This is just an example. A very simple one." 0 strcaseerror
+ ${UnStrCase} $0 "THIS IS JUST AN EXAMPLE. A VERY SIMPLE ONE." "S"
+ StrCmp $0 "This is just an example. A very simple one." 0 strcaseerror
+ ${UnStrCase} $0 "This is just an example. A very simple one." "L"
+ StrCmp $0 "this is just an example. a very simple one." 0 strcaseerror
+ ${UnStrCase} $0 "This is just an example. A very simple one." "U"
+ StrCmp $0 "THIS IS JUST AN EXAMPLE. A VERY SIMPLE ONE." 0 strcaseerror
+ ${UnStrCase} $0 "This is just an example. A very simple one." "T"
+ StrCmp $0 "This Is Just An Example. A Very Simple One." 0 strcaseerror
+ ${UnStrCase} $0 "This is just an example. A very simple one." "<>"
+ StrCmp $0 "tHIS IS JUST AN EXAMPLE. a VERY SIMPLE ONE." 0 strcaseerror
+ ${UnStrCase} $0 "123456789!@#%^&*()-_=+[]{};:,./<>?" "S"
+ StrCmp $0 "123456789!@#%^&*()-_=+[]{};:,./<>?" 0 strcaseerror
+ ${UnStrCase} $0 "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#%^&*()abcdefghijklmnopqrstuvwxyz-_=+[]{};:,./<>?" "<>"
+ StrCmp $0 "123456789abcdefghijklmnopqrstuvwxyz!@#%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ-_=+[]{};:,./<>?" 0 strcaseerror
+ ${UnStrCase} $0 "what about taking a shower tomorrow? it's late to do so now! try to sleep now. Good Night!" "S"
+ StrCmp $0 "What about taking a shower tomorrow? It's late to do so now! Try to sleep now. Good night!" 0 strcaseerror
+ !insertmacro StackVerificationEnd
+ IfErrors strcaseerror
+
+ DetailPrint "PASSED StrCase test"
+ Goto +2
+strcaseerror:
+ DetailPrint "FAILED StrCase test"
+
+ # Test clipboard function
+ !insertmacro StackVerificationStart
+ ${UnStrClb} $0 "StrFunc clipboard test" ">"
+ StrCmp $0 "" 0 strclberror
+ ${UnStrClb} $0 "StrFunc clipboard test #2" "<>"
+ StrCmp $0 "StrFunc clipboard test" 0 strclberror
+ ${UnStrClb} $0 "" "<"
+ StrCmp $0 "StrFunc clipboard test #2" 0 strclberror
+ ${UnStrClb} $0 "" ""
+ StrCmp $0 "" 0 strclberror
+ !insertmacro StackVerificationEnd
+ IfErrors strclberror
+
+ DetailPrint "PASSED StrClb test"
+ Goto +2
+strclberror:
+ DetailPrint "FAILED StrClb test"
+
+ # Test IO functions
+ !insertmacro StackVerificationStart
+ !macro untestio str
+ ${UnStrNSISToIO} $0 "${str}"
+ ${UnStrIOToNSIS} $0 $0
+ StrCmp $0 "${str}" 0 ioerror
+ !macroend
+ !insertmacro untestio "$\rtest$\n"
+ !insertmacro untestio "test$\n"
+ !insertmacro untestio "$\rtest"
+ !insertmacro untestio "test"
+ !insertmacro untestio "$\r\$\t$\n"
+ !insertmacro untestio "$\r \ $\t $\n $$"
+ !insertmacro untestio ""
+ !insertmacro untestio " "
+ !insertmacro StackVerificationEnd
+ IfErrors ioerror
+
+ DetailPrint "PASSED StrNSISToIO/StrIOToNSIS test"
+ Goto +2
+ioerror:
+ DetailPrint "FAILED StrNSISToIO/StrIOToNSIS test"
+
+ # Test string search functions
+ !insertmacro StackVerificationStart
+ ${UnStrLoc} $0 "This is just an example" "just" "<"
+ StrCmp $0 "11" 0 strlocerror
+ ${UnStrLoc} $0 a abc <
+ StrCmp $0 "" 0 strlocerror
+ ${UnStrLoc} $0 a abc >
+ StrCmp $0 "" 0 strlocerror
+ ${UnStrLoc} $0 abc a >
+ StrCmp $0 "0" 0 strlocerror
+ ${UnStrLoc} $0 abc b >
+ StrCmp $0 "1" 0 strlocerror
+ ${UnStrLoc} $0 abc c >
+ StrCmp $0 "2" 0 strlocerror
+ ${UnStrLoc} $0 abc a <
+ StrCmp $0 "2" 0 strlocerror
+ ${UnStrLoc} $0 abc b <
+ StrCmp $0 "1" 0 strlocerror
+ ${UnStrLoc} $0 abc c <
+ StrCmp $0 "0" 0 strlocerror
+ ${UnStrLoc} $0 abc d <
+ StrCmp $0 "" 0 strlocerror
+ !insertmacro StackVerificationEnd
+ IfErrors strlocerror
+
+ DetailPrint "PASSED StrLoc test"
+ Goto +2
+strlocerror:
+ DetailPrint "FAILED StrLoc test"
+
+ # Test string replacement
+ !insertmacro StackVerificationStart
+ ${UnStrRep} $0 "This is just an example" "an" "one"
+ StrCmp $0 "This is just one example" 0 strreperror
+ ${UnStrRep} $0 "test... test... 1 2 3..." "test" "testing"
+ StrCmp $0 "testing... testing... 1 2 3..." 0 strreperror
+ ${UnStrRep} $0 "" "test" "testing"
+ StrCmp $0 "" 0 strreperror
+ ${UnStrRep} $0 "test" "test" "testing"
+ StrCmp $0 "testing" 0 strreperror
+ ${UnStrRep} $0 "test" "test" ""
+ StrCmp $0 "" 0 strreperror
+ ${UnStrRep} $0 "test" "" "abc"
+ StrCmp $0 "test" 0 strreperror
+ ${UnStrRep} $0 "test" "" ""
+ StrCmp $0 "test" 0 strreperror
+ !insertmacro StackVerificationEnd
+ IfErrors strreperror
+
+ DetailPrint "PASSED StrRep test"
+ Goto +2
+strreperror:
+ DetailPrint "FAILED StrRep test"
+
+ # Test sorting
+ !insertmacro StackVerificationStart
+ ${UnStrSort} $0 "This is just an example" "" " just" "ple" "0" "0" "0"
+ StrCmp $0 "This is an exam" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "j" " " "0" "" "0"
+ StrCmp $0 "just" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" "" "j" "" "0" "1" "0"
+ StrCmp $0 "This is just an example" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "us" "" "0" "1" "0"
+ StrCmp $0 "just an example" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" "" "u" " " "0" "1" "0"
+ StrCmp $0 "This is just" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "just" " " "0" "1" "0"
+ StrCmp $0 "just" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "t" " " "0" "1" "0"
+ StrCmp $0 "This" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "le" " " "0" "1" "0"
+ StrCmp $0 "example" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "le" " " "1" "0" "0"
+ StrCmp $0 " examp" 0 strsorterror
+ ${UnStrSort} $0 "an error has occurred" " " "e" " " "0" "1" "0"
+ StrCmp $0 "error" 0 strsorterror
+ ${UnStrSort} $0 "" " " "something" " " "0" "1" "0"
+ StrCmp $0 "" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "j" " " "" "" ""
+ StrCmp $0 " just " 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "j" " " "1" "0" "1"
+ StrCmp $0 " ust " 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" "" "j" "" "0" "0" "1"
+ StrCmp $0 "This is ust an example" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "us" "" "1" "0" "0"
+ StrCmp $0 " jt an example" 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" "" "u" " " "0" "0" "1"
+ StrCmp $0 "This is jst " 0 strsorterror
+ ${UnStrSort} $0 "This is just an example" " " "just" " " "1" "0" "1"
+ StrCmp $0 " " 0 strsorterror
+ ${UnStrSort} $0 "an error has occurred" " " "e" "h" "1" "0" "0"
+ StrCmp $0 " rror " 0 strsorterror
+ ${UnStrSort} $0 "" " " "something" " " "1" "0" "1"
+ StrCmp $0 "" 0 strsorterror
+ !insertmacro StackVerificationEnd
+ IfErrors strsorterror
+
+ DetailPrint "PASSED StrSort test"
+ Goto +2
+strsorterror:
+ DetailPrint "FAILED StrSort test"
+
+ !insertmacro StackVerificationStart
+ ${UnStrStr} $0 "abcefghijklmnopqrstuvwxyz" "g"
+ StrCmp $0 "ghijklmnopqrstuvwxyz" 0 strstrerror
+ ${UnStrStr} $0 "abcefghijklmnopqrstuvwxyz" "ga"
+ StrCmp $0 "" 0 strstrerror
+ ${UnStrStr} $0 "abcefghijklmnopqrstuvwxyz" ""
+ StrCmp $0 "abcefghijklmnopqrstuvwxyz" 0 strstrerror
+ ${UnStrStr} $0 "a" "abcefghijklmnopqrstuvwxyz"
+ StrCmp $0 "" 0 strstrerror
+ !insertmacro StackVerificationEnd
+ IfErrors strstrerror
+
+ DetailPrint "PASSED StrStr test"
+ Goto +2
+strstrerror:
+ DetailPrint "FAILED StrStr test"
+
+ !insertmacro StackVerificationStart
+ ${UnStrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "0" "0"
+ StrCmp $0 "abcabcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "1" "0"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "2" "0"
+ StrCmp $0 "abc" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "3" "0"
+ StrCmp $0 "" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "abc" ">" "<" "1" "1" "0"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "abc" ">" "<" "0" "1" "0"
+ StrCmp $0 "abc" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "abc" "<" "<" "1" "0" "0"
+ StrCmp $0 "abcabcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "abc" "<" "<" "0" "0" "0"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "abc" "<" ">" "0" "0" "0"
+ StrCmp $0 "" 0 strstradverror
+ ${UnStrStrAdv} $0 "abcabcabc" "abc" "<" ">" "0" "1" "0"
+ StrCmp $0 "abc" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "0" "1"
+ StrCmp $0 "abcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "1" "1"
+ StrCmp $0 "abc" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "2" "1"
+ StrCmp $0 "" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "a" ">" ">" "1" "3" "1"
+ StrCmp $0 "" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "abc" ">" "<" "1" "1" "1"
+ StrCmp $0 "ABCabcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "abc" ">" "<" "0" "1" "1"
+ StrCmp $0 "ABCabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "abc" "<" "<" "1" "0" "1"
+ StrCmp $0 "ABCabcabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "abc" "<" "<" "0" "0" "1"
+ StrCmp $0 "ABCabc" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "0" "1"
+ StrCmp $0 "" 0 strstradverror
+ ${UnStrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "1" "1"
+ StrCmp $0 "abc" 0 strstradverror
+ !insertmacro StackVerificationEnd
+ IfErrors strstradverror
+
+ DetailPrint "PASSED StrStrAdv test"
+ Goto +2
+strstradverror:
+ DetailPrint "FAILED StrStrAdv test"
+
+ # Test tokenizer
+ !insertmacro StackVerificationStart
+ ${UnStrTok} $0 "This is, or is not, just an example" " ," "4" "1"
+ StrCmp $0 "not" 0 strtokerror
+ ${UnStrTok} $0 "This is, or is not, just an example" " ," "4" "0"
+ StrCmp $0 "is" 0 strtokerror
+ ${UnStrTok} $0 "This is, or is not, just an example" " ," "152" "0"
+ StrCmp $0 "" 0 strtokerror
+ ${UnStrTok} $0 "This is, or is not, just an example" " ," "" "0"
+ StrCmp $0 "example" 0 strtokerror
+ ${UnStrTok} $0 "This is, or is not, just an example" " ," "L" "0"
+ StrCmp $0 "example" 0 strtokerror
+ ${UnStrTok} $0 "This is, or is not, just an example" " ," "0" "0"
+ StrCmp $0 "This" 0 strtokerror
+ !insertmacro StackVerificationEnd
+ IfErrors strtokerror
+
+ DetailPrint "PASSED StrTok test"
+ Goto +2
+strtokerror:
+ DetailPrint "FAILED StrTok test"
+
+ # Test trim new lines
+ !insertmacro StackVerificationStart
+ ${UnStrTrimNewLines} $0 "$\r$\ntest$\r$\ntest$\r$\n"
+ StrCmp $0 "$\r$\ntest$\r$\ntest" 0 strtrimnewlineserror
+ !insertmacro StackVerificationEnd
+ IfErrors strtrimnewlineserror
+
+ DetailPrint "PASSED StrTrimNewLines test"
+ Goto +2
+strtrimnewlineserror:
+ DetailPrint "FAILED StrTrimNewLines test"
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/System/Resource.dll b/KattekerCreator/nsis/Examples/System/Resource.dll
new file mode 100644
index 0000000..fa34c0c
Binary files /dev/null and b/KattekerCreator/nsis/Examples/System/Resource.dll differ
diff --git a/KattekerCreator/nsis/Examples/System/SysFunc.nsh b/KattekerCreator/nsis/Examples/System/SysFunc.nsh
new file mode 100644
index 0000000..7a3e307
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/System/SysFunc.nsh
@@ -0,0 +1,395 @@
+; Some useful functions based on System plugin
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+
+!verbose push 3
+!ifndef SysFunc.NSH.Included
+!define SysFunc.NSH.Included
+
+!include "System.nsh"
+!include "WinMessages.nsh"
+
+; ================= GetInstallerExeName implementation =================
+
+; Adopted Get Parameter function -> now it gets full installer.exe path
+; input - nothing, output -> full path at the top of the stack
+Function GetInstallerExeName
+ Push $R0
+ Push $R1
+ Push $R2
+ StrCpy $R0 $CMDLINE 1
+ StrCpy $R1 '"'
+ StrCpy $R2 1
+ StrCmp $R0 '"' loop
+ StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
+ loop:
+ StrCpy $R0 $CMDLINE 1 $R2
+ StrCmp $R0 $R1 loop2
+ StrCmp $R0 "" loop2
+ IntOp $R2 $R2 + 1
+ Goto loop
+ loop2:
+
+ ; Ok, have we found last exename character or string end?
+ StrCmp $R0 "" "" +2
+ IntOp $R2 $R2 - 1 ; last exename char
+ StrCmp $R1 ' ' +3 ; was first character the '"', or something other?
+ StrCpy $R1 1 ; it was quote
+ Goto +2
+ StrCpy $R1 0
+ IntOp $R2 $R2 - $R1
+ StrCpy $R0 $CMDLINE $R2 $R1
+
+ SearchPath $R0 $R0 ; expand file name to full path
+
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+; ================= systemGetFileSysTime implementation =================
+
+!macro smGetFileSysTime FILENAME
+ Push ${FILENAME}
+ Call systemGetFileSysTime
+ Pop $R0
+!macroend
+
+; -----------------------------------------------------------------
+; systemGetFileSysTime (params on stack):
+; FILENAME - name of file to get file time
+; returns to stack (SYSTEMTIME struct addr)
+; -----------------------------------------------------------------
+
+; uses original method from NSIS
+Function systemGetFileSysTime
+ System::Store "s r1"
+
+ StrCpy $R0 0
+
+ ; create WIN32_FIND_DATA struct
+ System::Call '*${stWIN32_FIND_DATA} .r2'
+
+ ; Find file info
+ System::Call '${sysFindFirstFile}(r1, r2) .r3'
+
+ ; ok?
+ IntCmp $3 ${INVALID_HANDLE_VALUE} sgfst_exit
+
+ ; close file search
+ System::Call '${sysFindClose}(r3)'
+
+ ; Create systemtime struct for local time
+ System::Call '*${stSYSTEMTIME} .R0'
+
+ ; Get File time
+ System::Call '*$2${stWIN32_FIND_DATA} (,,, .r3)'
+
+ ; Convert file time (UTC) to local file time
+ System::Call '${sysFileTimeToLocalFileTime}(r3, .r1)'
+
+ ; Convert file time to system time
+ System::Call '${sysFileTimeToSystemTime}(r1, R0)'
+
+sgfst_exit:
+ ; free used memory for WIN32_FIND_DATA struct
+ System::Free $2
+
+ System::Store "P0 l"
+FunctionEnd
+
+; ================= systemMessageBox implementation =================
+
+; return to $R0
+!macro smMessageBox MODULE MSG CAPTION STYLE ICON
+ Push "${ICON}"
+ Push "${STYLE}"
+ Push "${CAPTION}"
+ Push "${MSG}"
+ Push "${MODULE}"
+ Call systemMessageBox
+ Pop $R0
+!macroend
+
+; -----------------------------------------------------------------
+; systemMessageBox (params on stack):
+; Module: either handle ("i HANDLE", HANDLE could be 0) or "modulename"
+; Msg: text of message
+; Caption: caption of message box window
+; Style: style, buttons etc
+; Icon: either icon handle ("i HANDLE") or resource name
+; returns to stack
+; -----------------------------------------------------------------
+Function systemMessageBox
+ System::Store "s r2r3r4r5r6"
+
+ ; may be Module is module handle?
+ StrCpy $1 $2
+ IntCmp $1 0 0 smbnext smbnext
+
+ ; Get module handle
+ System::Call '${sysGetModuleHandle}($2) .r1'
+ IntCmp $1 0 loadlib libnotloaded libnotloaded
+
+loadlib:
+ ; Load module and get handle
+ System::Call '${sysLoadLibrary}($2) .r1'
+ IntCmp $1 0 0 smbnext smbnext
+
+libnotloaded:
+ ; Indicate that LoadLibrary wasn't used
+ StrCpy $2 1
+
+smbnext:
+ ; Create MSGBOXPARAMS structure
+ System::Call '*${stMSGBOXPARAMS}(, $HWNDPARENT, r1, r3, r4, "$5|${MB_USERICON}", $6, _) .r0'
+ ; call MessageBoxIndirect
+ System::Call '${sysMessageBoxIndirect}(r0) .R0'
+ ; free MSGBOXPARAMS structure
+
+ System::Free $0
+
+ ; have we used load library at start?
+ IntCmp $2 0 0 smbskipfree smbskipfree
+ ; No, then free the module
+ System::Call '${sysFreeLibrary}(r1)'
+
+smbskipfree:
+ System::Store "P0 l"
+FunctionEnd
+
+; ================= systemSplash implementation =================
+
+; returns to $R0
+!macro smSystemSplash DELAY FILE
+ Push ${FILE}
+ Push ${DELAY}
+ call systemSplash
+ Pop $R0
+!macroend
+
+; -----------------------------------------------------------------
+; systemSplash (params on stack):
+; Delay - time in ms to show the splash
+; File - bitmap (& audio) file name (without extension)
+; returns to stack
+; -----------------------------------------------------------------
+
+Function _systemSplashWndCB
+ ; Callback receives 4 values
+ System::Store "s r2r5r7r9"
+
+ ; Message branching
+ IntCmp $5 ${WM_CLOSE} m_Close
+ IntCmp $5 ${WM_TIMER} m_Timer
+ IntCmp $5 ${WM_LBUTTONDOWN} m_Lbtn
+ IntCmp $5 ${WM_CREATE} m_Create
+ IntCmp $5 ${WM_PAINT} m_Paint
+ goto default
+
+m_Create:
+ ; Create structures
+ System::Call "*${stRECT} (_) .R8"
+ System::Call "*${stBITMAP} (_, &l0 .R7) .R9"
+
+ ; Get bitmap info
+ System::Call "${sysGetObject} (r6, R7, R9)"
+
+ ; Get desktop info
+ System::Call "${sysSystemParametersInfo} (${SPI_GETWORKAREA}, 0, R8, 0)"
+
+ ; Style (callbacked)
+ System::Call "${sysSetWindowLong} (r2, ${GWL_STYLE}, 0) .s"
+ !insertmacro SINGLE_CALLBACK 5 $R7 1 _systemSplashWndCB
+
+ ; Calculate and set window pos
+
+ ; Get bmWidth(R2) and bmHeight(R3)
+ System::Call "*$R9${stBITMAP} (,.R2,.R3)"
+ ; Get left(R4), top(R5), right(R6), bottom(R7)
+ System::Call "*$R8${stRECT} (.R4,.R5,.R6,.R7)"
+
+ ; Left pos
+ IntOp $R0 $R6 - $R4
+ IntOp $R0 $R0 - $R2
+ IntOp $R0 $R0 / 2
+ IntOp $R0 $R0 + $R4
+
+ ; Top pos
+ IntOp $R1 $R7 - $R5
+ IntOp $R1 $R1 - $R3
+ IntOp $R1 $R1 / 2
+ IntOp $R1 $R1 + $R5
+
+ System::Call "${sysSetWindowPos} (r2, 0, R0, R1, R2, R3, ${SWP_NOZORDER}) .s"
+ !insertmacro SINGLE_CALLBACK 6 $R7 1 _systemSplashWndCB
+
+ ; Show window
+ System::Call "${sysShowWindow} (r2, ${SW_SHOW}) .s"
+ !insertmacro SINGLE_CALLBACK 7 $R7 1 _systemSplashWndCB
+
+ ; Set Timer
+ System::Call "${sysSetTimer} (r2, 1, r8,)"
+
+ ; Free used memory
+ System::Free $R8
+ System::Free $R9
+
+ StrCpy $R0 0
+ goto exit
+
+m_Paint:
+ ; Create structures
+ System::Call "*${stRECT} (_) .R8"
+ System::Call "*${stPAINTSTRUCT} (_) .R9"
+
+ ; Begin Paint
+ System::Call "${sysBeginPaint} (r2, R9) .R7"
+
+ ; CreateCompatibleDC
+ System::Call "${sysCreateCompatibleDC} (R7) .R6"
+
+ ; GetClientRect
+ System::Call "${sysGetClientRect} (r2, R8)"
+
+ ; Select new bitmap
+ System::Call "${sysSelectObject} (R6, r6) .R5"
+
+ ; Get left(R0), top(R1), right(R2), bottom(R3)
+ System::Call "*$R8${stRECT} (.R0,.R1,.R2,.R3)"
+
+ ; width=right-left
+ IntOp $R2 $R2 - $R0
+ ; height=bottom-top
+ IntOp $R3 $R3 - $R1
+
+ System::Call "${sysBitBlt} (R7, R0, R1, R2, R3, R6, 0, 0, ${SRCCOPY})"
+
+ ; Select old bitmap
+ System::Call "${sysSelectObject} (R6, R5)"
+
+ ; Delete compatible DC
+ System::Call "${sysDeleteDC} (R6)"
+
+ ; End Paint
+ System::Call "${sysEndPaint} (r2, R9)"
+
+ ; Free used memory
+ System::Free $R8
+ System::Free $R9
+
+ StrCpy $R0 0
+ goto exit
+
+m_Timer:
+m_Lbtn:
+ StrCpy $4 0
+ IntCmp $5 ${WM_TIMER} destroy
+ StrCpy $4 1
+
+destroy:
+ System::Call "${sysDestroyWindow} (r2) .s"
+ !insertmacro SINGLE_CALLBACK 12 $R4 1 _systemSplashWndCB
+
+default:
+ ; Default
+ System::Call "${sysDefWindowProc} (r2, r5, r7, r9) .s"
+ !insertmacro SINGLE_CALLBACK 14 $R0 1 _systemSplashWndCB
+ goto exit
+
+m_Close:
+ StrCpy $R0 0
+ goto exit
+
+exit:
+ ; Restore
+ System::Store "p4P0 l R0r4"
+
+ ; Return from callback
+ System::Call "$3" $R0
+FunctionEnd
+
+Function systemSplash
+
+ ; Save registers and get input
+ System::Store "s r8r9"
+
+ ; Get module instance
+ System::Call "${sysGetModuleHandle} (p) .r7"
+
+ ; Get arrow cursor
+ System::Call "${sysLoadCursor} (0, p ${IDC_ARROW}) .R9"
+
+ ; Get callback
+ System::Get "${sysWNDPROC}"
+ Pop $3
+
+ ; Create window class
+ System::Call "*${stWNDCLASS} (0,r3,0,0,r7,0,R9,0,p 0,'_sp') .R9"
+
+ ; Register window class
+ System::Call "${sysRegisterClass} (R9) .R9"
+ IntCmp $R9 0 errorexit ; Class registered ok?
+
+ ; Load Image (LR_CREATEDIBSECTION|LR_LOADFROMFILE = 0x2010)
+ System::Call '${sysLoadImage} (, s, ${IMAGE_BITMAP}, 0, 0, ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) .r6' "$9.bmp"
+ IntCmp $6 0 errorexit ; Image loaded ok?
+
+ ; Start the sound (SND_ASYNC|SND_FILENAME|SND_NODEFAULT = 0x20003)
+ System::Call "${sysPlaySound} (s,,${SND_ASYNC}|${SND_FILENAME}|${SND_NODEFAULT})" "$9.wav"
+
+ ; Create window
+ System::Call "${sysCreateWindowEx} (${WS_EX_TOOLWINDOW}, s, s,,,,,, $HWNDPARENT,,r7,) .s" "_sp" "_sp"
+ !insertmacro SINGLE_CALLBACK 1 $5 1 _systemSplashWndCB
+
+ ; Create MSG struct
+ System::Call "*${stMSG} (_) p.R9"
+
+ ; -------------------------
+repeat:
+ ; Check for window
+ System::Call "${sysIsWindow} (r5) .s"
+ !insertmacro SINGLE_CALLBACK 2 $R8 1 _systemSplashWndCB
+ IntCmp $R8 0 finish
+
+ ; Get message
+ System::Call "${sysGetMessage} (R9, r5,_) .s"
+ !insertmacro SINGLE_CALLBACK 3 $R8 1 _systemSplashWndCB
+ IntCmp $R8 0 finish
+
+ ; Dispatch message
+ System::Call "${sysDispatchMessage} (R9) .s"
+ !insertmacro SINGLE_CALLBACK 4 $R8 1 _systemSplashWndCB
+
+ ; Repeat dispatch cycle
+ goto repeat
+ ; -------------------------
+
+finish:
+ ; Stop the sound
+ System::Call "${sysPlaySound} (p 0, p 0, i 0)"
+
+ ; Delete bitmap object
+ System::Call "${sysDeleteObject} (r6)"
+
+ ; Delete the callback queue
+ System::Free $3
+
+ ; Dialog return
+ StrCpy $R0 $4
+ goto exit
+
+; Exit in case of error
+errorexit:
+ StrCpy $R0 -1
+ goto exit
+
+exit:
+ ; Restore register and put output
+ System::Store "P0 l"
+FunctionEnd
+
+!endif
+!verbose pop
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/System/System.nsh b/KattekerCreator/nsis/Examples/System/System.nsh
new file mode 100644
index 0000000..1443800
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/System/System.nsh
@@ -0,0 +1,413 @@
+; Some useful functions, structures, constants
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+!verbose push 3
+!ifndef System.NSH.Included
+!define System.NSH.Included
+
+!include WinCore.nsh
+
+; ------------- Functions --------------
+
+; LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+!define sysWNDPROC "(p.s, i.s, p.s, p.s) pss"
+
+; LRESULT DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
+!define sysDefWindowProc "user32::DefWindowProc(p, i, p, p) p"
+
+!define sysMessageBox "user32::MessageBox(p, t, t, i) i"
+
+!define sysMessageBeep "user32::MessageBeep(i) i"
+
+!define sysMessageBoxIndirect 'user32::MessageBoxIndirect(p) i'
+
+; HMODULE GetModuleHandle(LPCTSTR lpModuleName);
+!define sysGetModuleHandle "kernel32::GetModuleHandle(t) i"
+
+; HMODULE LoadLibrary(LPCTSTR lpFileName);
+!define sysLoadLibrary "kernel32::LoadLibrary(t) p"
+
+; BOOL FreeLibrary(HMODULE hModule);
+!define sysFreeLibrary "kernel32::FreeLibrary(p) i"
+
+; HCURSOR LoadCursor(HINSTANCE hInstance, LPCTSTR lpCursorName);
+!define sysLoadCursor "user32::LoadCursor(p, t) p"
+
+; ATOM RegisterClass(CONST WNDCLASS *lpWndClass);
+!define sysRegisterClass "user32::RegisterClass(p) i"
+
+; HANDLE LoadImage(HINSTANCE hinst, LPCTSTR lpszName, UINT uType,
+; int cxDesired, int cyDesired, UINT fuLoad);
+!define sysLoadImage "user32::LoadImage(p, t, i, i, i, i) p"
+
+; BOOL PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
+!define sysPlaySound "winmm.dll::PlaySound(t, p, i) i"
+
+; HWND CreateWindowEx(DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName,
+; DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent,
+; HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
+!define sysCreateWindowEx "user32::CreateWindowEx(i, t, t, i, i, i, i, i, p, p, p, p) p"
+
+; BOOL IsWindow(HWND hWnd);
+!define sysIsWindow "user32::IsWindow(p) i"
+
+; LONG SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong);
+!define sysSetWindowLong "user32::SetWindowLong(p, i, p) p"
+
+; BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
+!define sysSetWindowPos "user32::SetWindowPos(p, p, i, i, i, i, i) i"
+
+; BOOL ShowWindow(HWND hWnd, int nCmdShow);
+!define sysShowWindow "user32::ShowWindow(p, i) i"
+
+; BOOL DestroyWindow(HWND hWnd);
+!define sysDestroyWindow "user32::DestroyWindow(p) i"
+
+; BOOL GetClientRect(HWND hWnd, LPRECT lpRect);
+!define sysGetClientRect "user32::GetClientRect(p, p) i"
+
+; BOOL GetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
+!define sysGetMessage "user32::GetMessage(p, p, i, i) i"
+
+; LRESULT DispatchMessage(CONST MSG *lpmsg);
+!define sysDispatchMessage "user32::DispatchMessage(p) p"
+
+; BOOL DeleteObject(HGDIOBJ hObject);
+!define sysDeleteObject "gdi32::DeleteObject(p) i"
+
+; int GetObject(HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject);
+!define sysGetObject "gdi32::GetObject(p, i, p) i"
+
+; HGDIOBJ SelectObject(HDC hdc, HGDIOBJ hgdiobj);
+!define sysSelectObject "gdi32::SelectObject(p, p) p"
+
+; HDC CreateCompatibleDC(HDC hdc);
+!define sysCreateCompatibleDC "gdi32::CreateCompatibleDC(p) p"
+
+; BOOL DeleteDC(HDC hdc);
+!define sysDeleteDC "gdi32::DeleteDC(p) i"
+
+; BOOL BitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
+; HDC hdcSrc, int nXSrc, int nYSrc, DWORD dwRop);
+!define sysBitBlt "gdi32::BitBlt(p, i, i, i, i, p, i, i, i) i"
+
+; proposed by abgandar
+; int AddFontResource(LPCTSTR lpszFilename);
+!define sysAddFontResource "gdi32::AddFontResource(t) i"
+
+; HDC BeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint);
+!define sysBeginPaint "user32::BeginPaint(p, p) p"
+
+; BOOL EndPaint(HWND hWnd, CONST PAINTSTRUCT *lpPaint);
+!define sysEndPaint "user32::EndPaint(p, p) i"
+
+; BOOL SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
+!define sysSystemParametersInfo "user32::SystemParametersInfo(i, i, p, i) i"
+
+; UINT_PTR SetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc);
+!define sysSetTimer "user32::SetTimer(p, p, i, k) i"
+
+; DWORD GetLogicalDriveStrings(DWORD nBufferLength, LPTSTR LpBuffer);
+!define sysGetLogicalDriveStrings 'kernel32::GetLogicalDriveStrings(i, p) i'
+
+!define sysGetDiskFreeSpaceEx 'kernel32::GetDiskFreeSpaceEx(t, *l, *l, *l) i'
+
+; UINT GetDriveType(LPCTSTR lpRootPathName);
+!define sysGetDriveType 'kernel32::GetDriveType(t) i'
+
+; HANDLE FindFirstFile(LPCTSTR lpFileName,LPWIN32_FIND_DATA lpFindFileData);
+!define sysFindFirstFile 'kernel32::FindFirstFile(t, p) p'
+
+; BOOL FindClose(HANDLE hFindFile);
+!define sysFindClose 'kernel32::FindClose(p) i'
+
+; BOOL FileTimeToSystemTime(CONST FILETIME *lpFileTime,
+; LPSYSTEMTIME lpSystemTime);
+!define sysFileTimeToSystemTime 'kernel32::FileTimeToSystemTime(*l, p) i'
+
+; BOOL FileTimeToLocalFileTime(
+; CONST FILETIME *lpFileTime,
+; LPFILETIME lpLocalFileTime);
+!define sysFileTimeToLocalFileTime 'kernel32::FileTimeToLocalFileTime(*l, *l) i'
+
+; BOOL SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION lpTimeZone,
+; LPSYSTEMTIME lpUniversalTime, LPSYSTEMTIME lpLocalTime);
+!define sysSystemTimeToTzSpecificLocalTime 'kernel32::SystemTimeToTzSpecificLocalTime(p, p, p) i'
+
+!define syslstrlen 'kernel32::lstrlen(t) i'
+
+; int wsprintf(LPTSTR lpOut, LPCTSTR lpFmt, ...);
+!define syswsprintf "user32::wsprintf(t, t) i ? c"
+
+; ------------- Structures --------------
+
+; typedef struct _WNDCLASS {
+; UINT style;
+; WNDPROC lpfnWndProc;
+; int cbClsExtra;
+; int cbWndExtra;
+; HINSTANCE hInstance;
+; HICON hIcon;
+; HCURSOR hCursor;
+; HBRUSH hbrBackground;
+; LPCTSTR lpszMenuName;
+; LPCTSTR lpszClassName;
+; } WNDCLASS, *PWNDCLASS;
+!define stWNDCLASS "(i, k, i, i, p, p, p, p, t, t) p"
+
+; typedef struct tagMSG {
+; HWND hwnd;
+; UINT message;
+; WPARAM wParam;
+; LPARAM lParam;
+; DWORD time;
+; POINT pt; -> will be presented as two separate px and py
+; } MSG, *PMSG;
+!define stMSG "(p, i, p, p, i, i, i) p"
+
+; typedef struct tagBITMAP {
+; LONG bmType;
+; LONG bmWidth;
+; LONG bmHeight;
+; LONG bmWidthBytes;
+; WORD bmPlanes;
+; WORD bmBitsPixel;
+; LPVOID bmBits;
+; } BITMAP, *PBITMAP;
+!define stBITMAP "(i, i, i, i, i, i, p) p"
+
+; typedef struct _RECT {
+; LONG left;
+; LONG top;
+; LONG right;
+; LONG bottom;
+; } RECT, *PRECT;
+!define stRECT "(i, i, i, i) p"
+
+; typedef struct tagPAINTSTRUCT {
+; HDC hdc;
+; BOOL fErase;
+; RECT rcPaint; (rcl, rct, rcr, rcb)
+; BOOL fRestore;
+; BOOL fIncUpdate;
+; BYTE rgbReserved[32];
+; } PAINTSTRUCT, *PPAINTSTRUCT;
+!define stPAINTSTRUCT "(p, i, i, i, i, i, i, i, &v32) p"
+
+; typedef struct {
+; UINT cbSize;
+; HWND hwndOwner;
+; HINSTANCE hInstance;
+; LPCTSTR lpszText;
+; LPCTSTR lpszCaption;
+; DWORD dwStyle;
+; LPCTSTR lpszIcon;
+; DWORD_PTR dwContextHelpId;
+; MSGBOXCALLBACK lpfnMsgBoxCallback;
+; DWORD dwLanguageId;
+; } MSGBOXPARAMS, *PMSGBOXPARAMS;
+!define stMSGBOXPARAMS '(&l4, p, p, t, t, i, t, p, k, i) p'
+
+; typedef struct _SYSTEMTIME {
+; WORD wYear;
+; WORD wMonth;
+; WORD wDayOfWeek;
+; WORD wDay;
+; WORD wHour;
+; WORD wMinute;
+; WORD wSecond;
+; WORD wMilliseconds;
+; } SYSTEMTIME, *PSYSTEMTIME;
+!define stSYSTEMTIME '(&i2, &i2, &i2, &i2, &i2, &i2, &i2, &i2) p'
+
+; Maximal windows path
+!define /ifndef MAX_PATH 260
+
+; typedef struct _WIN32_FIND_DATA {
+; DWORD dwFileAttributes;
+; FILETIME ftCreationTime;
+; FILETIME ftLastAccessTime;
+; FILETIME ftLastWriteTime;
+; DWORD nFileSizeHigh;
+; DWORD nFileSizeLow;
+; DWORD dwReserved0;
+; DWORD dwReserved1;
+; TCHAR cFileName[ MAX_PATH ];
+; TCHAR cAlternateFileName[ 14 ];
+; } WIN32_FIND_DATA, *PWIN32_FIND_DATA;
+!define stWIN32_FIND_DATA '(i, l, l, l, i, i, i, i, &t${MAX_PATH}, &t14) p'
+
+; ------------- Constants --------------
+
+; == Other ==
+!define /ifndef INVALID_HANDLE_VALUE -1
+
+; == Sounds ==
+
+!define SND_SYNC 0x0000
+!define SND_ASYNC 0x0001
+!define SND_NODEFAULT 0x0002
+!define SND_MEMORY 0x0004
+!define SND_LOOP 0x0008
+!define SND_NOSTOP 0x0010
+
+!define SND_NOWAIT 0x00002000
+!define SND_ALIAS 0x00010000
+!define SND_ALIAS_ID 0x00110000
+!define SND_FILENAME 0x00020000
+!define SND_RESOURCE 0x00040004
+!define SND_PURGE 0x0040
+!define SND_APPLICATION 0x0080
+
+; == Windows ==
+
+!define /ifndef WS_OVERLAPPED 0x00000000
+!define /ifndef WS_POPUP 0x80000000
+!define /ifndef WS_CHILD 0x40000000
+!define /ifndef WS_MINIMIZE 0x20000000
+!define /ifndef WS_VISIBLE 0x10000000
+!define /ifndef WS_DISABLED 0x08000000
+!define /ifndef WS_CLIPSIBLINGS 0x04000000
+!define /ifndef WS_CLIPCHILDREN 0x02000000
+!define /ifndef WS_MAXIMIZE 0x01000000
+!define /ifndef WS_CAPTION 0x00C00000
+!define /ifndef WS_BORDER 0x00800000
+!define /ifndef WS_DLGFRAME 0x00400000
+!define /ifndef WS_VSCROLL 0x00200000
+!define /ifndef WS_HSCROLL 0x00100000
+!define /ifndef WS_SYSMENU 0x00080000
+!define /ifndef WS_THICKFRAME 0x00040000
+!define /ifndef WS_GROUP 0x00020000
+!define /ifndef WS_TABSTOP 0x00010000
+!define /ifndef WS_MINIMIZEBOX 0x00020000
+!define /ifndef WS_MAXIMIZEBOX 0x00010000
+!define /ifndef WS_TILED ${WS_OVERLAPPED}
+!define /ifndef WS_ICONIC ${WS_MINIMIZE}
+!define /ifndef WS_SIZEBOX ${WS_THICKFRAME}
+!define /ifndef WS_OVERLAPPEDWINDOW 0x00CF0000
+!define /ifndef WS_TILEDWINDOW ${WS_OVERLAPPEDWINDOW}
+!define /ifndef WS_POPUPWINDOW 0x80880000
+!define /ifndef WS_CHILDWINDOW ${WS_CHILD}
+!define /ifndef WS_EX_DLGMODALFRAME 0x00000001
+!define /ifndef WS_EX_NOPARENTNOTIFY 0x00000004
+!define /ifndef WS_EX_TOPMOST 0x00000008
+!define /ifndef WS_EX_ACCEPTFILES 0x00000010
+!define /ifndef WS_EX_TRANSPARENT 0x00000020
+!define /ifndef WS_EX_MDICHILD 0x00000040
+!define /ifndef WS_EX_TOOLWINDOW 0x00000080
+!define /ifndef WS_EX_WINDOWEDGE 0x00000100
+!define /ifndef WS_EX_CLIENTEDGE 0x00000200
+!define /ifndef WS_EX_CONTEXTHELP 0x00000400
+!define /ifndef WS_EX_RIGHT 0x00001000
+!define /ifndef WS_EX_LEFT 0x00000000
+!define /ifndef WS_EX_RTLREADING 0x00002000
+!define /ifndef WS_EX_LTRREADING 0x00000000
+!define /ifndef WS_EX_LEFTSCROLLBAR 0x00004000
+!define /ifndef WS_EX_RIGHTSCROLLBAR 0x00000000
+!define /ifndef WS_EX_CONTROLPARENT 0x00010000
+!define /ifndef WS_EX_STATICEDGE 0x00020000
+!define /ifndef WS_EX_APPWINDOW 0x00040000
+!define /ifndef WS_EX_OVERLAPPEDWINDOW 0x00000300
+!define /ifndef WS_EX_PALETTEWINDOW 0x00000188
+!define /ifndef WS_EX_LAYERED 0x00080000
+!define /ifndef WS_EX_NOINHERITLAYOUT 0x00100000
+!define /ifndef WS_EX_LAYOUTRTL 0x00400000
+!define /ifndef WS_EX_COMPOSITED 0x02000000
+!define /ifndef WS_EX_NOACTIVATE 0x08000000
+
+
+; == System Parameters Info ==
+
+!define SPI_GETWORKAREA 0x0030
+
+; == Window swap ==
+
+!define SWP_NOSIZE 0x0001
+!define SWP_NOMOVE 0x0002
+!define SWP_NOZORDER 0x0004
+!define SWP_NOREDRAW 0x0008
+!define SWP_NOACTIVATE 0x0010
+!define SWP_FRAMECHANGED 0x0020
+!define SWP_SHOWWINDOW 0x0040
+!define SWP_HIDEWINDOW 0x0080
+!define SWP_NOCOPYBITS 0x0100
+!define SWP_NOOWNERZORDER 0x0200
+!define SWP_NOSENDCHANGING 0x0400
+
+!define SWP_DRAWFRAME ${SWP_FRAMECHANGED}
+!define SWP_NOREPOSITION ${SWP_NOOWNERZORDER}
+!define SWP_DEFERERASE 0x2000
+!define SWP_ASYNCWINDOWPOS 0x4000
+
+; == Bit Copy ==
+
+!define SRCCOPY 0x00CC0020
+!define SRCPAINT 0x00EE0086
+!define SRCAND 0x008800C6
+!define SRCINVERT 0x00660046
+!define SRCERASE 0x00440328
+!define NOTSRCCOPY 0x00330008
+!define NOTSRCERASE 0x001100A6
+!define MERGECOPY 0x00C000CA
+!define MERGEPAINT 0x00BB0226
+!define PATCOPY 0x00F00021
+!define PATPAINT 0x00FB0A09
+!define PATINVERT 0x005A0049
+!define DSTINVERT 0x00550009
+!define BLACKNESS 0x00000042
+!define WHITENESS 0x00FF0062
+
+; == Message Box ==
+
+!define MB_OK 0x00000000
+!define MB_OKCANCEL 0x00000001
+!define MB_ABORTRETRYIGNORE 0x00000002
+!define MB_YESNOCANCEL 0x00000003
+!define MB_YESNO 0x00000004
+!define MB_RETRYCANCEL 0x00000005
+!define MB_CANCELTRYCONTINUE 0x00000006
+!define MB_ICONHAND 0x00000010
+!define MB_ICONQUESTION 0x00000020
+!define MB_ICONEXCLAMATION 0x00000030
+!define MB_ICONASTERISK 0x00000040
+!define MB_USERICON 0x00000080
+!define MB_ICONWARNING ${MB_ICONEXCLAMATION}
+!define MB_ICONERROR ${MB_ICONHAND}
+
+!define MB_ICONINFORMATION ${MB_ICONASTERISK}
+!define MB_ICONSTOP ${MB_ICONHAND}
+
+!define MB_DEFBUTTON1 0x00000000
+!define MB_DEFBUTTON2 0x00000100
+!define MB_DEFBUTTON3 0x00000200
+!define MB_DEFBUTTON4 0x00000300
+
+!define MB_APPLMODAL 0x00000000
+!define MB_SYSTEMMODAL 0x00001000
+!define MB_TASKMODAL 0x00002000
+!define MB_HELP 0x00004000
+
+!define MB_NOFOCUS 0x00008000
+!define MB_SETFOREGROUND 0x00010000
+!define MB_DEFAULT_DESKTOP_ONLY 0x00020000
+
+!define MB_TOPMOST 0x00040000
+!define MB_RIGHT 0x00080000
+!define MB_RTLREADING 0x00100000
+
+
+; == Callbacks ==
+
+!macro SINGLE_CALLBACK CHKN RES INDEX FUNC
+CheckCB_${CHKN}:
+ Pop ${RES}
+ StrCmp ${RES} "callback${INDEX}" 0 ExitCB_${CHKN}
+ Call ${FUNC}
+ Goto CheckCB_${CHKN}
+ExitCB_${CHKN}:
+!macroend
+
+!endif
+!verbose pop
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/System/System.nsi b/KattekerCreator/nsis/Examples/System/System.nsi
new file mode 100644
index 0000000..cdd4c17
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/System/System.nsi
@@ -0,0 +1,137 @@
+; This is just an example of System Plugin
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+Name "System Plugin Example"
+OutFile "System.exe"
+
+!include "SysFunc.nsh"
+
+Section "ThisNameIsIgnoredSoWhyBother?"
+ SetOutPath $TEMP
+
+ ; ----- Sample 1 ----- Message box with custom icon -----
+
+ ; there are no default beeps for custom message boxes, use sysMessageBeep
+ ; in case you need it (see next message box example)
+ !insertmacro smMessageBox "i 0" "Message box with custom icon!" "System Example 1a" ${MB_OK} "i 103"
+ ; i 0 - installer exe as module
+ ; i 103 - icon ID
+
+ ; The same example but using icon from resource.dll.
+ ; You could use this dll for storing your resources, just replace FAR icon
+ ; with something you really need.
+ File "Resource.dll"
+ System::Call '${sysMessageBeep} (${MB_ICONHAND})' ; custom beep
+ !insertmacro smMessageBox "`$TEMP\resource.dll`" "Message box with custom icon from resource.dll!" "System Example 1b" ${MB_OKCANCEL} "i 103"
+ Delete $TEMP\resource.dll
+
+ ; ----- Sample 2 ----- Fixed disks size/space -----
+
+ StrCpy $7 ' Disk, Size, Free, Free for user:$\n$\n'
+
+ ; Memory for paths
+ System::StrAlloc 1024
+ Pop $1
+ ; Get drives
+ System::Call '${sysGetLogicalDriveStrings}(1024, r1)'
+enumok:
+ ; One more drive?
+ System::Call '${syslstrlen}(i r1) .r2'
+ IntCmp $2 0 enumex
+
+ ; Is it DRIVE_FIXED?
+ System::Call '${sysGetDriveType} (i r1) .r3'
+ StrCmp $3 ${DRIVE_FIXED} 0 enumnext
+
+ ; Drive space
+ System::Call '${sysGetDiskFreeSpaceEx}(i r1, .r3, .r4, .r5)'
+
+ ; Pretty KBs will be saved on stack
+ System::Int64Op $3 / 1048576
+ System::Int64Op $5 / 1048576
+ System::Int64Op $4 / 1048576
+
+ ; Get pretty drive path string
+ System::Call '*$1(&t1024 .r6)'
+ System::Call '${syswsprintf} (.r7, "%s%20s %20s mb %20s mb %20s mb$\n", tr7, tr6, ts, ts, ts)'
+
+enumnext:
+ ; Next drive path
+ IntOp $2 $2 * ${NSIS_CHAR_SIZE}
+ IntOp $1 $1 + $2
+ IntOp $1 $1 + ${NSIS_CHAR_SIZE}
+ goto enumok
+enumex: ; End of drives or user cancel
+ ; Free memory for paths
+ System::Free $1
+
+ ; Message box
+ System::Call '${sysMessageBox}($HWNDPARENT, s, "System Example 2", ${MB_OKCANCEL})' "$7"
+
+ ; ----- Sample 3 ----- Direct proc defenition -----
+
+ ; Direct specification demo
+ System::Call 'user32::MessageBox(p $HWNDPARENT, t "Just direct MessageBox specification demo ;)", t "System Example 3", i ${MB_OK}) i.s'
+ Pop $0
+
+ ; ----- Sample 4 ----- Int64, mixed definition demo -----
+
+ ; Long int demo
+ StrCpy $2 "12312312"
+ StrCpy $3 "12345678903"
+ System::Int64Op $2 "*" $3
+ Pop $4
+
+ ; Cdecl demo (uses 3 defenitions (simple example))
+ System::Call "${syswsprintf}(.R1, s,,, t, ir0) .R0 (,,tr2,tr3,$4_)" "Int64 ops and strange defenition demo, %s x %s == %s, and previous msgbox result = %d"
+ MessageBox MB_OKCANCEL "Cool: '$R1'"
+
+ ; ----- Sample 5 ----- Small structure example -----
+
+ ; Create & Fill structure
+ System::Call "*(i 123123123, &t10 'Hello', &i1 0x123dd, &i2 0xffeeddccaa) i.s"
+ Pop $1
+ ; Read data from structure
+ System::Call "*$1(i .r2, &t10 .r3, &i1 .r4, &i2 .r5, &l0 .r6)"
+ ; Show data and delete structure
+ MessageBox MB_OK "Structure example: $\nint == $2 $\nstring == $3 $\nbyte == $4 $\nshort == $5 $\nsize == $6"
+ System::Free $1
+
+ ; ----- Sample 6 ----- systemGetFileSysTime demo -----
+ Call GetInstallerExeName
+ pop $0
+
+ !insertmacro smGetFileSysTime $0
+ System::Call '*$R0${stSYSTEMTIME}(.r1, .r2, .r3, .r4, .r5, .r6, .r7, .r8)'
+
+ MessageBox MB_OK "GetFileSysTime example: file '$0', year $1, month $2, dow $3, day $4, hour $5, min $6, sec $7, ms $8"
+
+ ; free memory from SYSTEMTIME
+ System::Free $R0
+
+ ; ----- Sample 7 ----- systemSplash -> Callbacks demonstration -----
+
+ ; Logo
+ File /oname=spltmp.bmp "${NSISDIR}\Contrib\Graphics\Header\orange-nsis.bmp"
+; File /oname=spltmp.wav "d:\Windows\Media\tada.wav"
+
+ ; I. systemSplash variant
+ !insertmacro smSystemSplash 2000 "$TEMP\spltmp"
+
+ ; II. Splash Plugin variant
+; splash::show 2000 $TEMP\spltmp
+; Pop $R0 ; $R0 has '1' if the user closed the splash screen early,
+
+ ; remove logo
+ Delete $TEMP\spltmp.bmp
+; Delete $TEMP\spltmp.wav
+
+ ; Display splash result
+ pop $0
+ MessageBox MB_OK "Splash (callbacks) demo result $R0"
+
+SectionEnd
+
+; eof
diff --git a/KattekerCreator/nsis/Examples/TextFunc.ini b/KattekerCreator/nsis/Examples/TextFunc.ini
new file mode 100644
index 0000000..5b9a7bc
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/TextFunc.ini
@@ -0,0 +1,130 @@
+[Settings]
+NumFields=15
+NextButtonText=&Enter
+
+[Field 1]
+Type=Droplist
+Flags=NOTIFY
+State=1. LineFind
+ListItems=1. LineFind|2. LineRead|3. FileReadFromEnd|4. LineSum|5. FileJoin|6. TextCompare|7. ConfigRead|8. ConfigWrite|9. FileRecode
+Left=44
+Right=139
+Top=9
+Bottom=100
+
+[Field 2]
+Type=FileRequest
+Left=44
+Right=-17
+Top=30
+Bottom=41
+
+[Field 3]
+Type=FileRequest
+Left=44
+Right=-17
+Top=46
+Bottom=57
+
+[Field 4]
+Type=FileRequest
+State=3:-1
+Left=44
+Right=-17
+Top=62
+Bottom=75
+
+[Field 5]
+Type=Droplist
+Flags=NOTIFY
+State=Example1 (delete first two symbols)
+ListItems=Example1 (delete first two symbols)|Example2 (show changed lines)|Example3 (delete lines)|Example4 (insert lines)|Example5 (replace in file - WordFunc.nsh required)|Example6 (line string to cut or delete)|Example7 (read lines)
+Left=44
+Right=-36
+Top=81
+Bottom=155
+
+[Field 6]
+Type=Droplist
+Flags=NOTIFY
+State=Example1 (Different or Equal)
+ListItems=Example1 (Different or Equal)|Example2 (Compare line-by-line - Different)|Example3 (Compare line-by-line - Equal)|Example4 (Compare all lines - Different)|Example5 (Compare all lines - Equal)
+Left=44
+Right=-36
+Top=81
+Bottom=140
+
+[Field 7]
+Type=Droplist
+State=FileReadFromEndCallback
+ListItems=FileReadFromEndCallback
+Left=44
+Right=-36
+Top=81
+Bottom=92
+
+[Field 8]
+Type=Text
+Flags=READONLY
+Left=9
+Right=-36
+Top=108
+Bottom=120
+
+[Field 9]
+Type=Button
+Text=Edit
+Flags=NOTIFY
+Left=234
+Right=256
+Top=81
+Bottom=92
+
+[Field 10]
+Type=Button
+Text=Log
+Flags=NOTIFY|DISABLED
+Left=234
+Right=256
+Top=108
+Bottom=120
+
+[Field 11]
+Type=Label
+Text=InputFile
+Left=10
+Right=43
+Top=32
+Bottom=44
+
+[Field 12]
+Type=Label
+Text=OutputFile
+Left=10
+Right=43
+Top=48
+Bottom=60
+
+[Field 13]
+Type=Label
+Text=Range
+Left=10
+Right=44
+Top=65
+Bottom=75
+
+[Field 14]
+Type=Label
+Text=Function
+Left=10
+Right=43
+Top=81
+Bottom=92
+
+[Field 15]
+Type=Label
+Text=Result:
+Left=10
+Right=229
+Top=97
+Bottom=105
diff --git a/KattekerCreator/nsis/Examples/TextFunc.nsi b/KattekerCreator/nsis/Examples/TextFunc.nsi
new file mode 100644
index 0000000..e05b7f7
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/TextFunc.nsi
@@ -0,0 +1,834 @@
+;_____________________________________________________________________________
+;
+; Text Functions
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Text Functions"
+OutFile "TextFunc.exe"
+Caption "$(^Name)"
+XPStyle on
+RequestExecutionLevel user
+
+!include "WinMessages.nsh"
+!include "TextFunc.nsh"
+
+Var HWND
+Var INI
+Var LOG
+Var PROJECT
+Var CALLBACK
+Var VIEW
+Var FUNCTION
+Var LINEFIND1
+Var LINEFIND2
+Var LINEFIND3
+Var LINEREAD1
+Var LINEREAD2
+Var FILEREADFROMEND1
+Var LINESUM1
+Var FILEJOIN1
+Var FILEJOIN2
+Var FILEJOIN3
+Var TEXTCOMPARE1
+Var TEXTCOMPARE2
+Var TEXTCOMPARE3
+Var CONFIGREAD1
+Var CONFIGREAD2
+Var CONFIGWRITE1
+Var CONFIGWRITE2
+Var CONFIGWRITE3
+Var FILERECODE1
+Var FILERECODE2
+
+Page Custom ShowCustom LeaveCustom
+
+Function ShowCustom
+ InstallOptions::initDialog "$INI"
+ Pop $hwnd
+ GetDlgItem $0 $HWND 1206
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1208
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1209
+ ShowWindow $0 0
+ StrCpy $FUNCTION LineFind
+ StrCpy $LINEREAD2 10
+ StrCpy $TEXTCOMPARE3 FastDiff
+ StrCpy $CONFIGREAD1 "$WINDIR\system.ini"
+ StrCpy $CONFIGREAD2 "shell="
+ StrCpy $FILERECODE2 CharToOem
+ InstallOptions::show
+ Pop $0
+FunctionEnd
+
+Function LeaveCustom
+ ReadINIStr $0 $INI "Settings" "State"
+ ReadINIStr $R0 $INI "Field 1" "State"
+ ReadINIStr $R1 $INI "Field 2" "State"
+ ReadINIStr $R2 $INI "Field 3" "State"
+ ReadINIStr $R3 $INI "Field 4" "State"
+ ReadINIStr $R4 $INI "Field 5" "State"
+ ReadINIStr $R5 $INI "Field 6" "State"
+ StrCpy $R4 $R4 8
+ StrCpy $R5 $R5 8
+ StrCpy $6 0
+ StrCpy $7 '$${'
+ StrCpy $8 'r'
+ StrCpy $9 'n'
+
+ StrCmp $0 10 Log
+ StrCmp $0 9 ViewOrEdit
+ StrCmp $0 0 Enter
+ goto MainSend
+
+ Log:
+ Exec 'notepad.exe $LOG'
+ Abort
+
+ ViewOrEdit:
+ StrCmp $FUNCTION FileReadFromEnd 0 Edit
+ StrCmp $VIEW '' 0 ViewFileReadFromEndCallback
+ GetTempFileName $VIEW $PLUGINSDIR
+ StrCpy $7 '$$'
+ FileOpen $0 $VIEW w
+ FileWrite $0 `Function FileReadFromEndCallback$\r$\n`
+ FileWrite $0 ` MessageBox MB_OKCANCEL '$7$$9 "Line"=[$$9]$7\$9$7$$8 "#"=[$$8]$7\$9$7$$7 "-#"=[$$7]' IDOK +2$\r$\n`
+ FileWrite $0 ` StrCpy $$R0 StopFileReadFromEnd$\r$\n$\r$\n`
+ FileWrite $0 ` Push $$R0$\r$\n`
+ FileWrite $0 `FunctionEnd$\r$\n`
+ FileClose $0
+ StrCpy $7 '$${'
+ SetFileAttributes $VIEW READONLY
+ ViewFileReadFromEndCallback:
+ Exec 'notepad.exe $VIEW'
+ Abort
+
+ Edit:
+ StrCmp $CALLBACK '' +5
+ StrCmp $6$R6 '0$R0$R4$R5' showproject
+ StrCmp $R6 '$R0$R4$R5' +3
+ Delete $CALLBACK
+ StrCpy $CALLBACK ''
+ StrCpy $R6 '$R0$R4$R5'
+
+ #Project#
+ StrCmp $6$R0 "01. LineFind" 0 +5
+ IfFileExists $CALLBACK +2
+ GetTempFileName $CALLBACK $PLUGINSDIR
+ FileOpen $0 $CALLBACK w
+ goto function
+ IfFileExists $PROJECT +2
+ GetTempFileName $PROJECT $PLUGINSDIR
+ FileOpen $0 $PROJECT w
+
+ #Name#
+ FileWrite $0 'Name "$FUNCTION"$\r$\n'
+ FileWrite $0 'OutFile "$PROJECT.exe"$\r$\n$\r$\n'
+
+ #!include#
+ StrCmp $R0$R4 '1. LineFindExample5' 0 TextFuncInclude
+ IfFileExists '$EXEDIR\WordFunc.nsh' 0 +3
+ FileWrite $0 '!include "$EXEDIR\WordFunc.nsh"$\r$\n'
+ goto +2
+ FileWrite $0 '!include "WordFunc.nsh"$\r$\n'
+ FileWrite $0 '!insertmacro WordFind$\r$\n'
+ FileWrite $0 '!insertmacro WordFindS$\r$\n'
+ FileWrite $0 '!insertmacro WordFind2X$\r$\n'
+ FileWrite $0 '!insertmacro WordFind2XS$\r$\n'
+ FileWrite $0 '!insertmacro WordFind3X$\r$\n'
+ FileWrite $0 '!insertmacro WordFind3XS$\r$\n'
+ FileWrite $0 '!insertmacro WordReplace$\r$\n'
+ FileWrite $0 '!insertmacro WordReplaceS$\r$\n'
+ FileWrite $0 '!insertmacro WordAdd$\r$\n'
+ FileWrite $0 '!insertmacro WordAddS$\r$\n'
+ FileWrite $0 '!insertmacro WordInsert$\r$\n'
+ FileWrite $0 '!insertmacro WordInsertS$\r$\n'
+ FileWrite $0 '!insertmacro StrFilter$\r$\n'
+ FileWrite $0 '!insertmacro StrFilterS$\r$\n'
+ TextFuncInclude:
+ IfFileExists '$EXEDIR\TextFunc.nsh' 0 +3
+ FileWrite $0 '!include "$EXEDIR\TextFunc.nsh"$\r$\n'
+ goto +2
+ FileWrite $0 '!include "TextFunc.nsh"$\r$\n'
+ FileWrite $0 '!insertmacro $FUNCTION$\r$\n'
+ StrCmp $FUNCTION TextCompare +2
+ FileWrite $0 '!insertmacro TrimNewLines$\r$\n'
+
+ #Section#
+ FileWrite $0 '$\r$\nSection -empty$\r$\n'
+ FileWrite $0 'SectionEnd$\r$\n$\r$\n'
+
+ #Function .onInit#
+ FileWrite $0 'Function .onInit$\r$\n'
+ StrCmp $R0$R5 "6. TextCompareExample1" 0 TextCompareExample235
+ FileWrite $0 ' StrCpy $$R0 ""$\r$\n'
+ FileWrite $0 ' $7TextCompare} "$R1" "$R2" "$R3" "$R5"$\r$\n'
+ FileWrite $0 ' IfErrors error$\r$\n'
+ FileWrite $0 ' StrCmp $$R0 NotEqual 0 +2$\r$\n'
+ FileWrite $0 ' MessageBox MB_OK " Files differ" IDOK +2$\r$\n'
+ FileWrite $0 ' MessageBox MB_OK " Files identical"$\r$\n'
+ FileWrite $0 ' goto end$\r$\n$\r$\n'
+ goto endoninit
+ TextCompareExample235:
+ StrCmp $R0$R5 "6. TextCompareExample2" +3
+ StrCmp $R0$R5 "6. TextCompareExample3" +2
+ StrCmp $R0$R5 "6. TextCompareExample5" 0 TextCompareExample4
+ FileWrite $0 ' StrCpy $$R0 "$R1"$\r$\n'
+ FileWrite $0 ' StrCpy $$R1 "$R2"$\r$\n$\r$\n'
+ FileWrite $0 ' GetTempFileName $$R2$\r$\n'
+ FileWrite $0 ' FileOpen $$R3 $$R2 w$\r$\n'
+ FileWrite $0 ' FileWrite $$R3 "$$R0 | $$R1$$\$8$$\$9"$\r$\n'
+ FileWrite $0 ' $7TextCompare} "$$R0" "$$R1" "$R3" "$R5"$\r$\n'
+ FileWrite $0 ' IfErrors error$\r$\n'
+ FileWrite $0 ' Exec "notepad.exe $$R2"$\r$\n'
+ FileWrite $0 ' goto end$\r$\n$\r$\n'
+ goto endoninit
+ TextCompareExample4:
+ StrCmp $R0$R5 "6. TextCompareExample4" 0 LineFindExample123456
+ FileWrite $0 ' StrCpy $$R0 "$R1"$\r$\n'
+ FileWrite $0 ' StrCpy $$R1 "$R2"$\r$\n$\r$\n'
+ FileWrite $0 ' GetTempFileName $$R2$\r$\n'
+ FileWrite $0 ' FileOpen $$R3 $$R2 w$\r$\n'
+ FileWrite $0 ' FileWrite $$R3 "$$R0 | $$R1$$\$8$$\$9"$\r$\n'
+ FileWrite $0 ' $7TextCompare} "$$R0" "$$R1" "$R3" "$R5"$\r$\n'
+ FileWrite $0 ' IfErrors error$\r$\n'
+ FileWrite $0 ' FileWrite $$R3 "$$\$8$$\$9$$R1 | $$R0$$\$8$$\$9"$\r$\n'
+ FileWrite $0 ' $7TextCompare} "$$R1" "$$R0" "$R3" "$R5"$\r$\n'
+ FileWrite $0 ' FileClose $$R3$\r$\n'
+ FileWrite $0 ' IfErrors error$\r$\n'
+ FileWrite $0 ' Exec "notepad.exe $$R2"$\r$\n$\r$\n'
+ FileWrite $0 ' goto end$\r$\n$\r$\n'
+ goto endoninit
+ LineFindExample123456:
+ FileWrite $0 ' $7$FUNCTION} "$R1" "$R2" "$R3" "$R4"$\r$\n'
+ FileWrite $0 ' IfErrors error$\r$\n'
+ FileWrite $0 ' MessageBox MB_YESNO " Open output file?" IDNO end$\r$\n'
+ FileWrite $0 ' StrCmp "$R2" "" 0 +3$\r$\n'
+ FileWrite $0 ` Exec 'notepad.exe "$R1"'$\r$\n`
+ FileWrite $0 ' goto end$\r$\n'
+ FileWrite $0 ' SearchPath $$R2 "$R2"$\r$\n'
+ FileWrite $0 ` Exec 'notepad.exe "$$R2"'$\r$\n`
+ FileWrite $0 ' goto end$\r$\n$\r$\n'
+ endoninit:
+ FileWrite $0 ' error:$\r$\n'
+ FileWrite $0 ' MessageBox MB_OK "Error"$\r$\n$\r$\n'
+ FileWrite $0 ' end:$\r$\n'
+ FileWrite $0 ' Quit$\r$\n'
+ FileWrite $0 'FunctionEnd$\r$\n$\r$\n'
+ #FunctionEnd#
+
+
+ #Function CallBack#
+ StrCmp $CALLBACK '' 0 close
+ function:
+ StrCmp $R0 '1. LineFind' 0 +8
+ FileWrite $0 'Function $R4$\r$\n'
+ StrCmp $R4 "Example1" Example1LF
+ StrCmp $R4 "Example2" Example2LF
+ StrCmp $R4 "Example3" Example3LF
+ StrCmp $R4 "Example4" Example4LF
+ StrCmp $R4 "Example5" Example5LF
+ StrCmp $R4 "Example6" Example6LF
+
+ FileWrite $0 'Function $R5$\r$\n'
+ StrCmp $R5 "Example1" Example1TC
+ StrCmp $R5 "Example2" Example2TC
+ StrCmp $R5 "Example3" Example3TC
+ StrCmp $R5 "Example4" Example4TC
+ StrCmp $R5 "Example5" Example3TC
+
+ Example1LF:
+ FileWrite $0 " $7TrimNewLines} '$$R9' $$R9$\r$\n"
+ FileWrite $0 " StrCpy $$R9 $$R9 '' 2 ;delete first two symbols$\r$\n"
+ FileWrite $0 " StrCpy $$R9 '$$R9$$\$8$$\$9'$\r$\n$\r$\n"
+ goto endwrite
+ Example2LF:
+ FileWrite $0 " $7TrimNewLines} '$$R9' $$R9$\r$\n"
+ FileWrite $0 " StrCpy $$R9 '$$R9 ~Changed line ($$R8)~$$\$8$$\$9'$\r$\n$\r$\n"
+ goto endwrite
+ Example3LF:
+ FileWrite $0 " StrCpy $$0 SkipWrite$\r$\n$\r$\n"
+ goto endwrite
+ Example4LF:
+ FileWrite $0 " FileWrite $$R4 '---First Line---$$\$8$$\$9'$\r$\n"
+ FileWrite $0 " FileWrite $$R4 '---Second Line ...---$$\$8$$\$9'$\r$\n$\r$\n"
+ goto endwrite
+ Example5LF:
+ FileWrite $0 " ; You can use:$\r$\n"
+ FileWrite $0 " ; $7WordFind}|$7WordFindS}|$7WordFind2X}|$7WordFind2XS}|$\r$\n"
+ FileWrite $0 " ; $7WordFind3X}|$7WordFind3XS}|$7WordReplace}|$7WordReplaceS}|$\r$\n"
+ FileWrite $0 " ; $7WordAdd}|$7WordAddS}|$7WordInsert}|$7WordInsertS}|$\r$\n"
+ FileWrite $0 " ; $7StrFilter}|$7StrFilterS}$\r$\n$\r$\n"
+ FileWrite $0 " $7WordReplace} '$$R9' ' ' '_' '+*' $$R9$\r$\n$\r$\n"
+ goto endwrite
+ Example6LF:
+ FileWrite $0 ' ;(Cut lines from a line to another line (also including that line))$\r$\n'
+ FileWrite $0 ' StrCmp $$R0 finish stop$\r$\n'
+ FileWrite $0 ' StrCmp $$R0 start finish$\r$\n'
+ FileWrite $0 ' StrCmp $$R9 "Start Line$$\$8$$\$9" 0 skip$\r$\n'
+ FileWrite $0 ' StrCpy $$R0 start$\r$\n'
+ FileWrite $0 ' StrCpy $$R1 $$R9$\r$\n'
+ FileWrite $0 ' goto code$\r$\n'
+ FileWrite $0 ' finish:$\r$\n'
+ FileWrite $0 ' StrCmp $$R9 "Finish Line$$\$8$$\$9" 0 code$\r$\n'
+ FileWrite $0 ' StrCpy $$R0 finish$\r$\n'
+ FileWrite $0 ' StrCpy $$R2 $$R8$\r$\n'
+ FileWrite $0 ' goto code$\r$\n'
+ FileWrite $0 ' skip:$\r$\n'
+ FileWrite $0 ' StrCpy $$0 SkipWrite$\r$\n'
+ FileWrite $0 ' goto output$\r$\n'
+ FileWrite $0 ' stop:$\r$\n'
+ FileWrite $0 ' StrCpy $$0 StopLineFind$\r$\n'
+ FileWrite $0 ' goto output$\r$\n$\r$\n'
+ FileWrite $0 ' ;;(Delete lines from a line to another line (also including that line))$\r$\n'
+ FileWrite $0 ' ; StrCmp $$R0 finish code$\r$\n'
+ FileWrite $0 ' ; StrCmp $$R0 start finish$\r$\n'
+ FileWrite $0 ' ; StrCmp $$R9 "Start Line$$\$8$$\$9" 0 code$\r$\n'
+ FileWrite $0 ' ; StrCpy $$R0 start$\r$\n'
+ FileWrite $0 ' ; StrCpy $$R1 $$R8$\r$\n'
+ FileWrite $0 ' ; goto skip$\r$\n'
+ FileWrite $0 ' ; finish:$\r$\n'
+ FileWrite $0 ' ; StrCmp $$R9 "Finish Line$$\$8$$\$9" 0 skip$\r$\n'
+ FileWrite $0 ' ; StrCpy $$R0 finish$\r$\n'
+ FileWrite $0 ' ; StrCpy $$R2 $$R8$\r$\n'
+ FileWrite $0 ' ; skip:$\r$\n'
+ FileWrite $0 ' ; StrCpy $$0 SkipWrite$\r$\n'
+ FileWrite $0 ' ; goto output$\r$\n$\r$\n'
+ FileWrite $0 ' code:$\r$\n'
+ FileWrite $0 ' ;...$\r$\n$\r$\n'
+ FileWrite $0 ' output:$\r$\n'
+ goto endwrite
+ Example1TC:
+ FileWrite $0 " StrCpy $$R0 NotEqual$\r$\n"
+ FileWrite $0 " StrCpy $$0 StopTextCompare$\r$\n$\r$\n"
+ goto endwrite
+ Example2TC:
+ FileWrite $0 " FileWrite $$R3 '$$8=$$9'$\r$\n"
+ FileWrite $0 " FileWrite $$R3 '$$6=$$7$$\$8$$\$9'$\r$\n$\r$\n"
+ goto endwrite
+ Example3TC:
+ FileWrite $0 " FileWrite $$R3 '$$8|$$6=$$9'$\r$\n$\r$\n"
+ goto endwrite
+ Example4TC:
+ FileWrite $0 " FileWrite $$R3 '$$8=$$9'$\r$\n$\r$\n"
+ goto endwrite
+ endwrite:
+ FileWrite $0 ' Push $$0$\r$\n'
+ FileWrite $0 'FunctionEnd$\r$\n'
+ close:
+ FileClose $0
+ goto $6
+ #FunctionEnd#
+
+ showproject:
+ StrCmp $R0 '1. LineFind' 0 +3
+ ExecWait 'notepad.exe $CALLBACK'
+ goto +4
+ SetFileAttributes $PROJECT READONLY
+ ExecWait 'notepad.exe $PROJECT'
+ SetFileAttributes $PROJECT NORMAL
+ Abort
+
+ MainSend:
+ GetDlgItem $0 $HWND 1210
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 1
+ EnableWindow $0 1
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 1
+ EnableWindow $0 1
+ GetDlgItem $0 $HWND 1205
+ EnableWindow $0 1
+ GetDlgItem $0 $HWND 1206
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1207
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1208
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1209
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1211
+ EnableWindow $0 1
+
+ StrCmp $FUNCTION LineFind 0 +5
+ StrCpy $LINEFIND1 $R1
+ StrCpy $LINEFIND2 $R2
+ StrCpy $LINEFIND3 $R3
+ goto LineFindSend
+ StrCmp $FUNCTION LineRead 0 +4
+ StrCpy $LINEREAD1 $R1
+ StrCpy $LINEREAD2 $R2
+ goto LineFindSend
+ StrCmp $FUNCTION FileReadFromEnd 0 +3
+ StrCpy $FILEREADFROMEND1 $R1
+ goto LineFindSend
+ StrCmp $FUNCTION LineSum 0 +3
+ StrCpy $LINESUM1 $R1
+ goto LineFindSend
+ StrCmp $FUNCTION FileJoin 0 +5
+ StrCpy $FILEJOIN1 $R1
+ StrCpy $FILEJOIN2 $R2
+ StrCpy $FILEJOIN3 $R3
+ goto LineFindSend
+ StrCmp $FUNCTION TextCompare 0 +5
+ StrCpy $TEXTCOMPARE1 $R1
+ StrCpy $TEXTCOMPARE2 $R2
+ StrCpy $TEXTCOMPARE3 $R3
+ goto LineFindSend
+ StrCmp $FUNCTION ConfigRead 0 +4
+ StrCpy $CONFIGREAD1 $R1
+ StrCpy $CONFIGREAD2 $R2
+ goto LineFindSend
+ StrCmp $FUNCTION ConfigWrite 0 +5
+ StrCpy $CONFIGWRITE1 $R1
+ StrCpy $CONFIGWRITE2 $R2
+ StrCpy $CONFIGWRITE3 $R3
+ goto LineFindSend
+ StrCmp $FUNCTION FileRecode 0 +3
+ StrCpy $FILERECODE1 $R1
+ StrCpy $FILERECODE2 $R2
+
+ LineFindSend:
+ StrCmp $R0 "1. LineFind" 0 LineReadSend
+ StrCmp $FUNCTION LineFind 0 LineFindSend2
+ StrCmp $R4 "Example1" 0 +3
+ StrCpy $LINEFIND3 "3:-1"
+ goto LineFindSend2
+ StrCmp $R4 "Example2" 0 +3
+ StrCpy $LINEFIND3 "{5:12 15 -6:-5 -1}"
+ goto LineFindSend2
+ StrCmp $R4 "Example3" 0 +3
+ StrCpy $LINEFIND3 "2:3 10:-5 -3:-2"
+ goto LineFindSend2
+ StrCmp $R4 "Example4" 0 +3
+ StrCpy $LINEFIND3 "10"
+ goto LineFindSend2
+ StrCmp $R4 "Example5" 0 +3
+ StrCpy $LINEFIND3 "1:-1"
+ goto LineFindSend2
+ StrCmp $R4 "Example6" 0 +3
+ StrCpy $LINEFIND3 ""
+ goto LineFindSend2
+ StrCmp $R4 "Example7" 0 +2
+ StrCpy $LINEFIND3 "1:-1"
+
+ LineFindSend2:
+ StrCpy $FUNCTION LineFind
+ StrCmp $LINEFIND2 '/NUL' 0 +2
+ StrCpy $LINEFIND2 ''
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$LINEFIND1"
+ GetDlgItem $0 $HWND 1203
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$LINEFIND2"
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$LINEFIND3"
+ GetDlgItem $0 $HWND 1207
+ ShowWindow $0 1
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Edit"
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 1
+ StrCmp $LOG '' +2
+ EnableWindow $0 1
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:OutputFile"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Range"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Function"
+
+ StrCmp $R4 "Example7" 0 +9
+ GetDlgItem $0 $HWND 1203
+ EnableWindow $0 0
+ SendMessage $0 ${WM_ENABLE} 1 0
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:/NUL"
+ GetDlgItem $0 $HWND 1204
+ EnableWindow $0 0
+ GetDlgItem $0 $HWND 1211
+ EnableWindow $0 0
+ abort
+
+
+ LineReadSend:
+ StrCmp $R0 "2. LineRead" 0 FileReadFromEndSend
+ StrCpy $FUNCTION LineRead
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$LINEREAD1"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$LINEREAD2"
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Line #"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ Abort
+
+ FileReadFromEndSend:
+ StrCmp $R0 "3. FileReadFromEnd" 0 LineSumSend
+ StrCpy $FUNCTION FileReadFromEnd
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$FILEREADFROMEND1"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1209
+ ShowWindow $0 1
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:View"
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Function"
+ Abort
+
+ LineSumSend:
+ StrCmp $R0 "4. LineSum" 0 FileJoinSend
+ StrCpy $FUNCTION LineSum
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$LINESUM1"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ Abort
+
+ FileJoinSend:
+ StrCmp $R0 "5. FileJoin" 0 TextCompareSend
+ StrCpy $FUNCTION FileJoin
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$FILEJOIN1"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$FILEJOIN2"
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 1
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 1
+ EnableWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$FILEJOIN3"
+ GetDlgItem $0 $HWND 1206
+ ShowWindow $0 1
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile1"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile2"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:OutputFile"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ Abort
+
+ TextCompareSend:
+ StrCmp $R0 "6. TextCompare" 0 ConfigReadSend
+ StrCmp $FUNCTION TextCompare 0 TextCompareSend2
+ StrCmp $R5 "Example1" 0 +3
+ StrCpy $TEXTCOMPARE3 "FastDiff"
+ goto TextCompareSend2
+ StrCmp $R5 "Example2" 0 +3
+ StrCpy $TEXTCOMPARE3 "FastDiff"
+ goto TextCompareSend2
+ StrCmp $R5 "Example3" 0 +3
+ StrCpy $TEXTCOMPARE3 "FastEqual"
+ goto TextCompareSend2
+ StrCmp $R5 "Example4" 0 +3
+ StrCpy $TEXTCOMPARE3 "SlowDiff"
+ goto TextCompareSend2
+ StrCmp $R5 "Example5" 0 +2
+ StrCpy $TEXTCOMPARE3 "SlowEqual"
+
+ TextCompareSend2:
+ StrCpy $FUNCTION TextCompare
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$TEXTCOMPARE1"
+ GetDlgItem $0 $HWND 1203
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$TEXTCOMPARE2"
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 1
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 1
+ EnableWindow $0 0
+ SendMessage $0 ${WM_ENABLE} 1 0
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$TEXTCOMPARE3"
+ GetDlgItem $0 $HWND 1208
+ ShowWindow $0 1
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:View"
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 1
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:TextFile1"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:TextFile2"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Option"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Function"
+ abort
+
+ ConfigReadSend:
+ StrCmp $R0 "7. ConfigRead" 0 ConfigWriteSend
+ StrCpy $FUNCTION ConfigRead
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$CONFIGREAD1"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$CONFIGREAD2"
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Entry"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ Abort
+
+ ConfigWriteSend:
+ StrCmp $R0 "8. ConfigWrite" 0 FileRecodeSend
+ StrCpy $FUNCTION ConfigWrite
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$CONFIGWRITE1"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$CONFIGWRITE2"
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$CONFIGWRITE3"
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Entry"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Value"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ Abort
+
+ FileRecodeSend:
+ StrCmp $R0 "9. FileRecode" 0 Abort
+ StrCpy $FUNCTION FileRecode
+ GetDlgItem $0 $HWND 1201
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$FILERECODE1"
+ GetDlgItem $0 $HWND 1203
+ ShowWindow $0 1
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:$FILERECODE2"
+ GetDlgItem $0 $HWND 1204
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1205
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1211
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1212
+ ShowWindow $0 0
+ GetDlgItem $0 $HWND 1213
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:InputFile"
+ GetDlgItem $0 $HWND 1214
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:Format"
+ GetDlgItem $0 $HWND 1215
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $0 $HWND 1216
+ SendMessage $0 ${WM_SETTEXT} 1 "STR:"
+ Abort
+
+;=Enter=
+ Enter:
+ StrCmp $R1 '' 0 +3
+ StrCpy $0 'Choose InputFile'
+ goto send
+ IfFileExists $R1 +3
+ StrCpy $0 'InputFile is not exist'
+ goto send
+
+ StrCmp $R0 "1. LineFind" LineFindRead
+ StrCmp $R0 "2. LineRead" LineRead
+ StrCmp $R0 "3. FileReadFromEnd" FileReadFromEnd
+ StrCmp $R0 "4. LineSum" LineSum
+ StrCmp $R0 "5. FileJoin" FileJoin
+ StrCmp $R0 "6. TextCompare" LineFind-TextCompare
+ StrCmp $R0 "7. ConfigRead" ConfigRead
+ StrCmp $R0 "8. ConfigWrite" ConfigWrite
+ StrCmp $R0 "9. FileRecode" FileRecode
+ Abort
+
+ LineFindRead:
+ StrCmp $R4 "Example7" 0 LineFind-TextCompare
+ ${LineFind} '$R1' '/NUL' '$R3' LineFindCallback
+ IfErrors error
+ StrCmp $R0 StopLineFind 0 done
+ StrCpy $0 'stopped'
+ goto send
+
+ LineFind-TextCompare:
+ GetLabelAddress $6 LineFindBack
+ goto Edit
+ LineFindBack:
+ FileClose $0
+ StrCmp $R0 "6. TextCompare" Compile
+ StrCmp $CALLBACK '' Compile
+ ${FileJoin} "$PROJECT" "$CALLBACK" ""
+
+ Compile:
+ StrCmp $LOG '' 0 +4
+ GetTempFileName $LOG $PLUGINSDIR
+ GetDlgItem $0 $HWND 1212
+ EnableWindow $0 1
+ ReadRegStr $0 HKLM "SOFTWARE\NSIS" ""
+ IfErrors 0 +2
+ StrCpy $0 "${NSISDIR}"
+ nsExec::Exec '"$0\makensis.exe" /O$LOG $PROJECT'
+ Pop $0
+ StrCmp $0 0 0 +6
+ ExecWait '$PROJECT.exe' $0
+ Delete $PROJECT
+ Delete $PROJECT.exe
+ StrCpy $PROJECT ''
+ goto done
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION "Compile error. Open log?" IDNO +2
+ Exec 'notepad.exe $LOG'
+ StrCpy $0 "Compile Error"
+ goto send
+
+ LineRead:
+ ${LineRead} "$R1" "$R2" $0
+ IfErrors error send
+
+ FileReadFromEnd:
+ ${FileReadFromEnd} "$R1" "FileReadFromEndCallback"
+ IfErrors error
+ StrCmp $R0 StopFileReadFromEnd 0 done
+ StrCpy $0 'stopped'
+ goto send
+
+ LineSum:
+ ${LineSum} "$R1" $0
+ IfErrors error send
+
+ FileJoin:
+ ${FileJoin} "$R1" "$R2" "$R3"
+ IfErrors error
+ MessageBox MB_YESNO " Open output file?" IDNO done
+ StrCmp $R3 '' 0 +3
+ Exec '"notepad.exe" "$R1"'
+ goto done
+ Exec '"notepad.exe" "$R3"'
+ goto done
+
+ ConfigRead:
+ ${ConfigRead} "$R1" "$R2" $0
+ IfErrors error send
+
+ ConfigWrite:
+ ${ConfigWrite} "$R1" "$R2" "$R3" $0
+ IfErrors error
+ MessageBox MB_YESNO " Open output file?" IDNO send
+ Exec '"notepad.exe" "$R1"'
+ goto send
+
+ FileRecode:
+ ${FileRecode} "$R1" "$R2"
+ IfErrors error
+ MessageBox MB_YESNO " Open output file?" IDNO done
+ Exec '"notepad.exe" "$R1"'
+ goto done
+
+ error:
+ StrCpy $0 'error'
+ goto send
+
+ done:
+ StrCpy $0 'Done'
+
+ send:
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$0"
+
+ abort:
+ Abort
+FunctionEnd
+
+Function LineFindCallback
+ MessageBox MB_OKCANCEL '$$R9 "Line"=[$R9]$\n$$R8 "#"=[$R8]$\n$$R7 "-#"=[$R7]$\n$$R6 "Range"=[$R6]$\n$$R5 "Read"=[$R5]$\n$$R4 "Write"=[$R4]' IDOK +2
+ StrCpy $R0 StopLineFind
+
+ Push $R0
+FunctionEnd
+
+Function FileReadFromEndCallback
+ MessageBox MB_OKCANCEL '$$9 "Line"=[$9]$\n$$8 "#"=[$8]$\n$$7 "-#"=[$7]' IDOK +2
+ StrCpy $R0 StopFileReadFromEnd
+
+ Push $R0
+FunctionEnd
+
+Function .onInit
+ InitPluginsDir
+ GetTempFileName $INI $PLUGINSDIR
+ File /oname=$INI "TextFunc.ini"
+FunctionEnd
+
+Page instfiles
+
+Section -Empty
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/TextFuncTest.nsi b/KattekerCreator/nsis/Examples/TextFuncTest.nsi
new file mode 100644
index 0000000..359cdec
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/TextFuncTest.nsi
@@ -0,0 +1,414 @@
+;_____________________________________________________________________________
+;
+; Text Functions Test
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Text Functions Test"
+OutFile "TextFuncTest.exe"
+Caption "$(^Name)"
+ShowInstDetails show
+XPStyle on
+RequestExecutionLevel user
+
+Var FUNCTION
+Var TEMPFILE1
+Var TEMPFILE2
+Var TEMPFILE3
+Var HANDLE
+Var OUT
+
+!include "TextFunc.nsh"
+
+;############### INSTALL ###############
+
+!define StackVerificationStart `!insertmacro StackVerificationStart`
+!macro StackVerificationStart _FUNCTION
+ StrCpy $FUNCTION ${_FUNCTION}
+ Call StackVerificationStart
+!macroend
+
+!define StackVerificationEnd `!insertmacro StackVerificationEnd`
+!macro StackVerificationEnd
+ Call StackVerificationEnd
+!macroend
+
+Function StackVerificationStart
+ StrCpy $0 !0
+ StrCpy $1 !1
+ StrCpy $2 !2
+ StrCpy $3 !3
+ StrCpy $4 !4
+ StrCpy $5 !5
+ StrCpy $6 !6
+ StrCpy $7 !7
+ StrCpy $8 !8
+ StrCpy $9 !9
+ StrCpy $R0 !R0
+ StrCpy $R1 !R1
+ StrCpy $R2 !R2
+ StrCpy $R3 !R3
+ StrCpy $R4 !R4
+ StrCpy $R5 !R5
+ StrCpy $R6 !R6
+ StrCpy $R7 !R7
+ StrCpy $R8 !R8
+ StrCpy $R9 !R9
+FunctionEnd
+
+Function StackVerificationEnd
+ IfErrors +3
+ DetailPrint 'PASSED $FUNCTION no errors'
+ goto +2
+ DetailPrint 'FAILED $FUNCTION error'
+
+ StrCmp $0 '!0' 0 error
+ StrCmp $1 '!1' 0 error
+ StrCmp $2 '!2' 0 error
+ StrCmp $3 '!3' 0 error
+ StrCmp $4 '!4' 0 error
+ StrCmp $5 '!5' 0 error
+ StrCmp $6 '!6' 0 error
+ StrCmp $7 '!7' 0 error
+ StrCmp $8 '!8' 0 error
+ StrCmp $9 '!9' 0 error
+ StrCmp $R0 '!R0' 0 error
+ StrCmp $R1 '!R1' 0 error
+ StrCmp $R2 '!R2' 0 error
+ StrCmp $R3 '!R3' 0 error
+ StrCmp $R4 '!R4' 0 error
+ StrCmp $R5 '!R5' 0 error
+ StrCmp $R6 '!R6' 0 error
+ StrCmp $R7 '!R7' 0 error
+ StrCmp $R8 '!R8' 0 error
+ StrCmp $R9 '!R9' 0 error
+ DetailPrint 'PASSED $FUNCTION stack'
+ goto end
+
+ error:
+ DetailPrint 'FAILED $FUNCTION stack'
+; MessageBox MB_OKCANCEL '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}' IDOK +2
+; quit
+
+ end:
+FunctionEnd
+
+
+
+Section CreateTestFile
+ GetTempFileName $TEMPFILE1
+ FileOpen $HANDLE $TEMPFILE1 w
+ FileWrite $HANDLE '1A=a$\r$\n'
+ FileWrite $HANDLE '2B=b$\r$\n'
+ FileWrite $HANDLE '3C=c$\r$\n'
+ FileWrite $HANDLE '4D=d$\r$\n'
+ FileWrite $HANDLE '5E=e$\r$\n'
+ FileClose $HANDLE
+ GetTempFileName $TEMPFILE2
+ GetTempFileName $TEMPFILE3
+SectionEnd
+
+
+Section LineFind
+ ${StackVerificationStart} LineFind
+
+ ${LineFind} '$TEMPFILE1' '/NUL' '1:-4 3 -1' 'LineFindCallback1'
+ IfErrors error
+ StrCmp $OUT '|1:2|-5|1|1A=a$\r$\n|1:2|-4|2|2B=b$\r$\n|3:3|-3|3|3C=c$\r$\n' 0 error
+
+ StrCpy $OUT ''
+ SetDetailsPrint none
+ ${LineFind} '$TEMPFILE1' '$TEMPFILE2' '1:-1' 'LineFindCallback2'
+ SetDetailsPrint both
+ IfErrors error
+ StrCmp $OUT '|1:-1||1|1A=a$\r$\n|1:-1||2|4D=d$\r$\n|1:-1||3|3C=c$\r$\n|1:-1||4|2B=B$\r$\n|1:-1||5|5E=e$\r$\n' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+Function LineFindCallback1
+ StrCpy $OUT '$OUT|$R6|$R7|$R8|$R9'
+ StrCmp $R8 3 0 +2
+ StrCpy $0 StopLineFind
+
+ Push $0
+FunctionEnd
+
+Function LineFindCallback2
+ StrCmp $R8 2 0 +2
+ StrCpy $R9 '4D=d$\r$\n'
+ StrCmp $R8 4 0 +2
+ StrCpy $R9 '2B=B$\r$\n'
+
+ StrCpy $OUT '$OUT|$R6|$R7|$R8|$R9'
+
+ Push $0
+FunctionEnd
+
+
+Section LineRead
+ ${StackVerificationStart} LineRead
+
+ ${LineRead} '$TEMPFILE1' '-1' $OUT
+ IfErrors error
+ StrCmp $OUT '5E=e$\r$\n' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section FileReadFromEnd
+ ${StackVerificationStart} FileReadFromEnd
+
+ StrCpy $OUT ''
+ ${FileReadFromEnd} '$TEMPFILE1' 'FileReadFromEndCallback'
+ IfErrors error
+ StrCmp $OUT '|-1|5|5E=e$\r$\n|-2|4|4D=d$\r$\n|-3|3|3C=c$\r$\n|-4|2|2B=b$\r$\n' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+Function FileReadFromEndCallback
+ StrCpy $OUT '$OUT|$7|$8|$9'
+ StrCmp $8 2 0 +2
+ StrCpy $0 StopFileReadFromEnd
+
+ Push $0
+FunctionEnd
+
+
+Section LineSum
+ ${StackVerificationStart} LineSum
+
+ ${LineSum} '$TEMPFILE1' $OUT
+ IfErrors error
+ StrCmp $OUT '5' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section FileJoin
+ ${StackVerificationStart} FileJoin
+
+ SetDetailsPrint none
+ ${FileJoin} '$TEMPFILE1' '$TEMPFILE2' '$TEMPFILE3'
+ SetDetailsPrint both
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section TextCompare
+ ${StackVerificationStart} TextCompare
+
+ StrCpy $OUT ''
+ ${TextCompare} '$TEMPFILE1' '$TEMPFILE2' 'FastDiff' 'TextCompareCallback'
+ StrCmp $OUT '|2|4D=d$\r$\n|2|2B=b$\r$\n|4|2B=B$\r$\n|4|4D=d$\r$\n' 0 error
+
+ StrCpy $OUT ''
+ ${TextCompare} '$TEMPFILE1' '$TEMPFILE2' 'FastEqual' 'TextCompareCallback'
+ StrCmp $OUT '|1|1A=a$\r$\n|1|1A=a$\r$\n|3|3C=c$\r$\n|3|3C=c$\r$\n|5|5E=e$\r$\n|5|5E=e$\r$\n' 0 error
+
+ StrCpy $OUT ''
+ ${TextCompare} '$TEMPFILE1' '$TEMPFILE2' 'SlowDiff' 'TextCompareCallback'
+ StrCmp $OUT '' 0 error
+
+ StrCpy $OUT ''
+ ${TextCompare} '$TEMPFILE1' '$TEMPFILE2' 'SlowEqual' 'TextCompareCallback'
+ StrCmp $OUT '|1|1A=a$\r$\n|1|1A=a$\r$\n|4|2B=B$\r$\n|2|2B=b$\r$\n|3|3C=c$\r$\n|3|3C=c$\r$\n|2|4D=d$\r$\n|4|4D=d$\r$\n|5|5E=e$\r$\n|5|5E=e$\r$\n' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+Section TextCompareS
+ ${StackVerificationStart} TextCompareS
+
+ StrCpy $OUT ''
+ ${TextCompareS} '$TEMPFILE1' '$TEMPFILE2' 'SlowDiff' 'TextCompareCallback'
+ StrCmp $OUT '|||2|2B=b$\r$\n' 0 error
+
+ StrCpy $OUT ''
+ ${TextCompareS} '$TEMPFILE1' '$TEMPFILE2' 'SlowEqual' 'TextCompareCallback'
+ StrCmp $OUT '|1|1A=a$\r$\n|1|1A=a$\r$\n|3|3C=c$\r$\n|3|3C=c$\r$\n|2|4D=d$\r$\n|4|4D=d$\r$\n|5|5E=e$\r$\n|5|5E=e$\r$\n' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+Function TextCompareCallback
+ StrCpy $OUT '$OUT|$6|$7|$8|$9'
+
+ Push $0
+FunctionEnd
+
+
+Section ConfigRead
+ ${StackVerificationStart} ConfigRead
+
+ ${ConfigRead} '$TEMPFILE1' '3c=' $OUT
+ StrCmp $OUT 'c' 0 error
+
+ ${ConfigRead} '$TEMPFILE1' '6F=' $OUT
+ StrCmp $OUT '' 0 error
+
+ ${ConfigRead} '$TEMPFILE1' 'FF=' $OUT
+ IfErrors 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section ConfigReadS
+ ${StackVerificationStart} ConfigReadS
+
+ ${ConfigReadS} '$TEMPFILE1' '3C=' $OUT
+ StrCmp $OUT 'c' 0 error
+
+ ${ConfigReadS} '$TEMPFILE1' '3c=' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section ConfigWrite
+ ${StackVerificationStart} ConfigWrite
+
+ ${ConfigWrite} '$TEMPFILE1' '5E=' 'e**' $OUT
+ StrCmp $OUT 'CHANGED' 0 error
+
+ ${ConfigWrite} '$TEMPFILE1' '2B=' '' $OUT
+ StrCmp $OUT 'DELETED' 0 error
+
+ ${ConfigWrite} '$TEMPFILE1' '3c=' 'c' $OUT
+ StrCmp $OUT 'SAME' 0 error
+
+ ${ConfigWrite} '$TEMPFILE1' '6F=' '*' $OUT
+ StrCmp $OUT 'ADDED' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section ConfigWriteS
+ ${StackVerificationStart} ConfigWriteS
+
+ ${ConfigWriteS} '$TEMPFILE1' '5e=' 'e**' $OUT
+ StrCmp $OUT 'ADDED' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section FileRecode
+ ${StackVerificationStart} FileRecode
+
+ ${FileRecode} '$TEMPFILE1' 'CharToOem'
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section TrimNewLines
+ ${StackVerificationStart} TrimNewLines
+
+ ${TrimNewLines} 'Text Line$\r$\n' $OUT
+ StrCmp $OUT 'Text Line' 0 error
+
+ ${TrimNewLines} 'Text Line' $OUT
+ StrCmp $OUT 'Text Line' 0 error
+
+ ${TrimNewLines} 'Text Line$\n' $OUT
+ StrCmp $OUT 'Text Line' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WriteUninstaller
+ SetDetailsPrint none
+ Delete $TEMPFILE1
+ Delete $TEMPFILE2
+ Delete $TEMPFILE3
+ SetDetailsPrint both
+ goto +2
+ WriteUninstaller '$EXEDIR\un.TextFuncTest.exe'
+SectionEnd
+
+
+
+;############### UNINSTALL ###############
+
+Section un.Uninstall
+ ${LineFind} '$TEMPFILE1' '/NUL' '1:-1' 'un.LineFindCallback'
+ ${LineRead} '$TEMPFILE1' '-1' $OUT
+ ${FileReadFromEnd} '$TEMPFILE1' 'un.FileReadFromEndCallback'
+ ${LineSum} '$TEMPFILE1' $OUT
+ ${FileJoin} '$TEMPFILE1' '$TEMPFILE2' '$TEMPFILE3'
+ ${TextCompare} '$TEMPFILE1' '$TEMPFILE2' 'FastDiff' 'un.TextCompareCallback'
+ ${TextCompareS} '$TEMPFILE1' '$TEMPFILE2' 'FastDiff' 'un.TextCompareCallback'
+ ${ConfigRead} '$TEMPFILE1' '3c=' $OUT
+ ${ConfigReadS} '$TEMPFILE1' '3c=' $OUT
+ ${ConfigWrite} '$TEMPFILE1' '5E=' 'e**' $OUT
+ ${ConfigWriteS} '$TEMPFILE1' '5E=' 'e**' $OUT
+ ${FileRecode} '$TEMPFILE1' 'CharToOem'
+ ${TrimNewLines} 'Text Line$\r$\n' $OUT
+SectionEnd
+
+Function un.LineFindCallback
+ Push $0
+FunctionEnd
+
+Function un.FileReadFromEndCallback
+ Push $0
+FunctionEnd
+
+Function un.TextCompareCallback
+ Push $0
+FunctionEnd
diff --git a/KattekerCreator/nsis/Examples/UserInfo/UserInfo.nsi b/KattekerCreator/nsis/Examples/UserInfo/UserInfo.nsi
new file mode 100644
index 0000000..e05a161
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/UserInfo/UserInfo.nsi
@@ -0,0 +1,44 @@
+Name "UserInfo.dll test"
+OutFile UserInfo.exe
+
+!define REALMSG "$\nOriginal non-restricted account type: $2"
+
+Section
+ ClearErrors
+ UserInfo::GetName
+ IfErrors Win9x
+ Pop $0
+ UserInfo::GetAccountType
+ Pop $1
+ # GetOriginalAccountType will check the tokens of the original user of the
+ # current thread/process. If the user tokens were elevated or limited for
+ # this process, GetOriginalAccountType will return the non-restricted
+ # account type.
+ # On Vista with UAC, for example, this is not the same value when running
+ # with `RequestExecutionLevel user`. GetOriginalAccountType will return
+ # "admin" while GetAccountType will return "user".
+ UserInfo::GetOriginalAccountType
+ Pop $2
+ StrCmp $1 "Admin" 0 +3
+ MessageBox MB_OK 'User "$0" is in the Administrators group${REALMSG}'
+ Goto done
+ StrCmp $1 "Power" 0 +3
+ MessageBox MB_OK 'User "$0" is in the Power Users group${REALMSG}'
+ Goto done
+ StrCmp $1 "User" 0 +3
+ MessageBox MB_OK 'User "$0" is just a regular user${REALMSG}'
+ Goto done
+ StrCmp $1 "Guest" 0 +3
+ MessageBox MB_OK 'User "$0" is a guest${REALMSG}'
+ Goto done
+ MessageBox MB_OK "Unknown error"
+ Goto done
+
+ Win9x:
+ # This one means you don't need to care about admin or
+ # not admin because Windows 9x doesn't either
+ MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
+
+ done:
+SectionEnd
+
diff --git a/KattekerCreator/nsis/Examples/UserVars.nsi b/KattekerCreator/nsis/Examples/UserVars.nsi
new file mode 100644
index 0000000..784b52b
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/UserVars.nsi
@@ -0,0 +1,69 @@
+; UserVars.nsi
+;
+; This script shows you how to declare and user variables.
+
+;--------------------------------
+
+ Name "User Variables Text"
+ OutFile "UserVars.exe"
+
+ InstallDir "$PROGRAMFILES\User Variables Test"
+
+ RequestExecutionLevel admin
+
+;--------------------------------
+
+ ;Pages
+ Page directory
+ Page instfiles
+
+ UninstPage uninstConfirm
+ UninstPage instfiles
+
+;--------------------------------
+; Declaration of user variables (Var command), allowed charaters for variables names : [a-z][A-Z][0-9] and '_'
+
+ Var "Name"
+ Var "Serial"
+ Var "Info"
+
+;--------------------------------
+; Installer
+
+Section "Dummy Section" SecDummy
+
+ StrCpy $0 "Admin"
+ StrCpy "$Name" $0
+ StrCpy "$Serial" "12345"
+ MessageBox MB_OK "User Name: $Name $\n$\nSerial Number: $Serial"
+
+ CreateDirectory $INSTDIR
+ WriteUninstaller "$INSTDIR\Uninst.exe"
+
+SectionEnd
+
+Section "Another Section"
+
+ Var /GLOBAL "AnotherVar"
+
+ StrCpy $AnotherVar "test"
+
+SectionEnd
+
+;--------------------------------
+; Uninstaller
+
+Section "Uninstall"
+
+ StrCpy $Info "User variables test uninstalled successfully."
+ Delete "$INSTDIR\Uninst.exe"
+ RmDir $INSTDIR
+
+SectionEnd
+
+Function un.OnUninstSuccess
+
+ HideWindow
+ MessageBox MB_OK "$Info"
+
+FunctionEnd
diff --git a/KattekerCreator/nsis/Examples/VPatch/example.nsi b/KattekerCreator/nsis/Examples/VPatch/example.nsi
new file mode 100644
index 0000000..081420e
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/VPatch/example.nsi
@@ -0,0 +1,62 @@
+;VPatch example
+;Written by Joost Verburg
+
+;--------------------------------
+
+; The name of the installer
+Name "VPatch Test"
+
+; The file to write
+OutFile "vpatchtest.exe"
+
+; The default installation directory
+InstallDir "$PROGRAMFILES\VPatch Test"
+
+; The text to prompt the user to enter a directory
+DirText "Choose a folder in which to install the VPatch Test!"
+
+; Show details
+ShowInstDetails show
+
+;--------------------------------
+; The normal way to use VPatch
+;--------------------------------
+!include "VPatchLib.nsh"
+
+Section "Update file"
+ ; Set output path to the installation directory
+ SetOutPath $INSTDIR
+
+ ; Extract the old file under name 'updatefile.txt'
+ File /oname=updatefile.txt oldfile.txt
+
+ ; Update the file - it will be replaced with the new version
+ DetailPrint "Updating updatefile.txt using patch..."
+ !insertmacro VPatchFile "patch.pat" "$INSTDIR\updatefile.txt" "$INSTDIR\temporaryfile.txt"
+
+SectionEnd
+
+;-------------------------------
+; The hard way to use VPatch
+;-------------------------------
+Section "New version in separate file"
+
+ ; Set output path to the installation directory
+ SetOutPath $INSTDIR
+
+ ; Extract the old file
+ File oldfile.txt
+
+ ; Extract the patch to the plug-ins folder (temporary)
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\patch.pat patch.pat
+
+ ; Update the old file to the new file using the patch
+ DetailPrint "Updating oldfile.txt using patch to newfile.txt..."
+ vpatch::vpatchfile "$PLUGINSDIR\patch.pat" "$INSTDIR\oldfile.txt" "$INSTDIR\newfile.txt"
+
+ ; Show result
+ Pop $R0
+ DetailPrint "Result: $R0"
+
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/VPatch/newfile.txt b/KattekerCreator/nsis/Examples/VPatch/newfile.txt
new file mode 100644
index 0000000..2369a70
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/VPatch/newfile.txt
@@ -0,0 +1,6 @@
+*** THIS IS A TEST FILE FOR THE VPATCH EXAMPLE ***
+*** COMPILE EXAMPLE.NSI TO TEST ***
+
+newfile - vpatch
+
+67890 - GHIJKL
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/VPatch/oldfile.txt b/KattekerCreator/nsis/Examples/VPatch/oldfile.txt
new file mode 100644
index 0000000..a378cf3
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/VPatch/oldfile.txt
@@ -0,0 +1,6 @@
+*** THIS IS A TEST FILE FOR THE VPATCH EXAMPLE ***
+*** COMPILE EXAMPLE.NSI TO TEST ***
+
+oldfile - vpatch
+
+12345 - ABCDEF
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/VPatch/patch.pat b/KattekerCreator/nsis/Examples/VPatch/patch.pat
new file mode 100644
index 0000000..e1e5304
Binary files /dev/null and b/KattekerCreator/nsis/Examples/VPatch/patch.pat differ
diff --git a/KattekerCreator/nsis/Examples/VersionInfo.nsi b/KattekerCreator/nsis/Examples/VersionInfo.nsi
new file mode 100644
index 0000000..1ff449d
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/VersionInfo.nsi
@@ -0,0 +1,29 @@
+; VersionInfo.nsi
+;
+; This script shows you how to add version information to an installer.
+; Windows shows this information on the Version tab of the File properties.
+
+;--------------------------------
+
+Name "Version Info"
+
+OutFile "VersionInfo.exe"
+
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
+;--------------------------------
+;Version Information
+
+ VIProductVersion "1.2.3.4"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Test Application"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A test comment"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Fake company"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Test Application is a trademark of Fake company"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Fake company"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Test Application"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.2.3"
+
+;--------------------------------
+
+Section ""
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/WordFunc.ini b/KattekerCreator/nsis/Examples/WordFunc.ini
new file mode 100644
index 0000000..38c748d
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/WordFunc.ini
@@ -0,0 +1,107 @@
+[Settings]
+NumFields=13
+NextButtonText=&Enter
+
+[Field 1]
+Type=Droplist
+Flags=NOTIFY
+State=1. WordFind (Find word by number)
+ListItems=1. WordFind (Find word by number)| (Delimiter exclude)| (Sum of words)| (Sum of delimiters)| (Find word number)| ( }} )| ( {} )| ( *} )|2. WordFind2X|3. WordReplace (Replace)| (Delete)| (Multiple-replace)|4. WordAdd (Add)| (Delete) |5. WordInsert|6. StrFilter (UpperCase)| (LowerCase)| (Filter)|7. VersionCompare|8. VersionConvert
+Left=44
+Right=190
+Top=10
+Bottom=191
+
+[Field 2]
+Type=Text
+State=C:\io.sys|C:\logo.sys|C:\Program Files|C:\WINDOWS
+Left=44
+Right=-10
+Top=30
+Bottom=41
+
+[Field 3]
+Type=Text
+State=|C:\
+Left=44
+Right=-10
+Top=46
+Bottom=59
+
+[Field 4]
+Type=Text
+Flags=DISABLED
+Left=44
+Right=-10
+Top=62
+Bottom=75
+
+[Field 5]
+Type=Text
+State=-4
+Left=44
+Right=-10
+Top=80
+Bottom=92
+
+[Field 6]
+Type=Text
+Left=10
+Right=-30
+Top=108
+Bottom=120
+
+[Field 7]
+Type=Text
+Left=-22
+Right=-10
+Top=108
+Bottom=120
+
+[Field 8]
+Type=Label
+Text=String
+Left=10
+Right=43
+Top=32
+Bottom=44
+
+[Field 9]
+Type=Label
+Text=Delimiter
+Left=10
+Right=43
+Top=48
+Bottom=60
+
+[Field 10]
+Type=Label
+Left=10
+Right=44
+Top=65
+Bottom=76
+
+[Field 11]
+Type=Label
+Text=Word #
+Left=10
+Right=43
+Top=81
+Bottom=94
+
+[Field 12]
+Type=Label
+Text=Result (Word):
+Left=10
+Right=236
+Top=97
+Bottom=110
+
+[Field 13]
+Type=Label
+Text=EL
+Left=-21
+Right=-10
+Top=97
+Bottom=110
+
diff --git a/KattekerCreator/nsis/Examples/WordFunc.nsi b/KattekerCreator/nsis/Examples/WordFunc.nsi
new file mode 100644
index 0000000..a0e9f99
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/WordFunc.nsi
@@ -0,0 +1,535 @@
+;_____________________________________________________________________________
+;
+; Word Functions
+;_____________________________________________________________________________
+;
+; 2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Word Functions"
+OutFile "WordFunc.exe"
+Caption "$(^Name)"
+XPStyle on
+RequestExecutionLevel user
+
+Var INI
+Var HWND
+Var STATE
+
+!include "WinMessages.nsh"
+!include "WordFunc.nsh"
+
+Page Custom ShowCustom LeaveCustom
+
+Function ShowCustom
+ InstallOptions::initDialog "$INI"
+ Pop $hwnd
+ InstallOptions::show
+ Pop $0
+FunctionEnd
+
+Function LeaveCustom
+ ReadINIStr $0 $INI "Settings" "State"
+ StrCmp $0 0 Enter
+
+ GetDlgItem $1 $HWND 1202
+ EnableWindow $1 1
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 1
+ GetDlgItem $1 $HWND 1206
+ EnableWindow $1 1
+ GetDlgItem $1 $HWND 1205
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1206
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+
+ ReadINIStr $0 $INI "Field 1" "State"
+ StrCmp $0 "1. WordFind (Find word by number)" 0 WordFind2Send
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|C:\"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:-4"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Word):"
+ goto WordFindSend
+
+ WordFind2Send:
+ StrCmp $0 " (Delimiter exclude)" 0 WordFind3Send
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|C:\"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E-2{"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Before{ or }after delimiter):"
+ goto WordFindSend
+
+ WordFind3Send:
+ StrCmp $0 " (Sum of words)" 0 WordFind4Send
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|C:\"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:#"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Sum of words):"
+ goto WordFindSend
+
+ WordFind4Send:
+ StrCmp $0 " (Sum of delimiters)" 0 WordFind5Send
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E*"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Option"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Sum of delimiters):"
+ goto WordFindSend
+
+ WordFind5Send:
+ StrCmp $0 " (Find word number)" 0 WordFind6Send
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|C:\"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:/Program Files"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:/Word"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Word #):"
+ goto WordFindSend
+
+ WordFind6Send:
+ StrCmp $0 " ( }} )" 0 WordFind7Send
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|C:\"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E+2}}"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Before{{ or }}after word):"
+ goto WordFindSend
+
+ WordFind7Send:
+ StrCmp $0 " ( {} )" 0 WordFind8Send
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|C:\"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:+2{}"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Without word):"
+ goto WordFindSend
+
+ WordFind8Send:
+ StrCmp $0 " ( *} )" 0 WordFind2XSend
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|C:\"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E+2*}"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Before{* or *}after word with word):"
+ goto WordFindSend
+
+ WordFind2XSend:
+ StrCmp $0 "2. WordFind2X" 0 WordReplace1Send
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:[C:\"
+ GetDlgItem $1 $HWND 1203
+ EnableWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:];"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E+2"
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:String"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Delimiter1"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Delimiter2"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (Word):"
+ abort
+
+ WordReplace1Send:
+ StrCmp $0 "3. WordReplace (Replace)" 0 WordReplace2Send
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:C:\io.sys|C:\logo.sys|C:\WINDOWS"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:SYS"
+ GetDlgItem $1 $HWND 1203
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:bmp"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:+2"
+ goto WordReplaceSend
+
+ WordReplace2Send:
+ StrCmp $0 " (Delete)" 0 WordReplace3Send
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:C:\io.sys|C:\logo.sys|C:\WINDOWS"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:SYS"
+ GetDlgItem $1 $HWND 1203
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E+"
+ goto WordReplaceSend
+
+ WordReplace3Send:
+ StrCmp $0 " (Multiple-replace)" 0 WordAdd1Send
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:C:\io.sys||||||C:\logo.sys|||C:\WINDOWS"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|"
+ GetDlgItem $1 $HWND 1203
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:+1*"
+ goto WordReplaceSend
+
+ WordAdd1Send:
+ StrCmp $0 "4. WordAdd (Add)" 0 WordAdd2Send
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:+C:\WINDOWS|C:\config.sys|C:\IO.SYS"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (String1 + String2):"
+ goto WordAddSend
+
+ WordAdd2Send:
+ StrCmp $0 " (Delete) " 0 WordInsertSend
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E-C:\WINDOWS|C:\config.sys|C:\IO.SYS"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (String1 - String2):"
+ goto WordAddSend
+
+ WordInsertSend:
+ StrCmp $0 "5. WordInsert" 0 StrFilter1Send
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:C:\io.sys|C:\WINDOWS"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|"
+ GetDlgItem $1 $HWND 1203
+ EnableWindow $1 1
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:C:\logo.sys"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:E+2"
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:String"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Delimiter"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result:"
+ abort
+
+ StrFilter1Send:
+ StrCmp $0 "6. StrFilter (UpperCase)" 0 StrFilter2Send
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:123abc 456DEF 7890|%#"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:+"
+ GetDlgItem $1 $HWND 1203
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (String in uppercase):"
+ goto StrFilterSend
+
+ StrFilter2Send:
+ StrCmp $0 " (LowerCase)" 0 StrFilter3Send
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:123abc 456DEF 7890|%#"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:-"
+ GetDlgItem $1 $HWND 1203
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:ef"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (String in lowercase except EF):"
+ goto StrFilterSend
+
+ StrFilter3Send:
+ StrCmp $0 " (Filter)" 0 VersionCompareSend
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:123abc 456DEF 7890|%#"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:+12"
+ GetDlgItem $1 $HWND 1203
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:b"
+ GetDlgItem $1 $HWND 1204
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:def"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (String Digits + Letters + b - def):"
+ goto StrFilterSend
+
+ VersionCompareSend:
+ StrCmp $0 "7. VersionCompare" 0 VersionConvertSend
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:1.1.1.9"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:1.1.1.01"
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1206
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Version1"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Version2"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (0-equal 1-newer 2-older):"
+ abort
+
+ VersionConvertSend:
+ StrCmp $0 "8. VersionConvert" 0 Abort
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:9.0c"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1203
+ ShowWindow $1 0
+ GetDlgItem $1 $HWND 1204
+ ShowWindow $1 0
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1206
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Version"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:CharList"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result (numerical version format):"
+ abort
+
+ Abort:
+ Abort
+
+ WordFindSend:
+ GetDlgItem $1 $HWND 1203
+ EnableWindow $1 0
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:C:\io.sys|C:\logo.sys|C:\Program Files|C:\WINDOWS"
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:String"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Delimiter"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ Abort
+
+ WordReplaceSend:
+ GetDlgItem $1 $HWND 1203
+ EnableWindow $1 1
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:String"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Replace it"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR: with"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Word #"
+ GetDlgItem $1 $HWND 1211
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Result:"
+ Abort
+
+ WordAddSend:
+ GetDlgItem $1 $HWND 1203
+ EnableWindow $1 0
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1201
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:C:\io.sys|C:\logo.sys|C:\WINDOWS"
+ GetDlgItem $1 $HWND 1202
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:|"
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:String1"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Delimiter"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:String2"
+ Abort
+
+ StrFilterSend:
+ GetDlgItem $1 $HWND 1203
+ EnableWindow $1 1
+ GetDlgItem $1 $HWND 1206
+ EnableWindow $1 0
+ GetDlgItem $1 $HWND 1207
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:String"
+ GetDlgItem $1 $HWND 1208
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Filter"
+ GetDlgItem $1 $HWND 1209
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Include"
+ GetDlgItem $1 $HWND 1210
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:Exclude"
+ Abort
+
+;=Enter=
+ Enter:
+ StrCpy $0 ''
+ ReadINIStr $STATE $INI "Field 1" "State"
+ ReadINIStr $R1 $INI "Field 2" "State"
+ ReadINIStr $R2 $INI "Field 3" "State"
+ ReadINIStr $R3 $INI "Field 4" "State"
+ ReadINIStr $R4 $INI "Field 5" "State"
+
+ StrCmp $STATE "1. WordFind (Find word by number)" WordFind
+ StrCmp $STATE " (Delimiter exclude)" WordFind
+ StrCmp $STATE " (Find in string)" WordFind
+ StrCmp $STATE " (Sum of words)" WordFind
+ StrCmp $STATE " (Sum of delimiters)" WordFind
+ StrCmp $STATE " (Find word number)" WordFind
+ StrCmp $STATE " ( }} )" WordFind
+ StrCmp $STATE " ( {} )" WordFind
+ StrCmp $STATE " ( *} )" WordFind
+ StrCmp $STATE "2. WordFind2X" WordFind2X
+ StrCmp $STATE "3. WordReplace (Replace)" WordReplace
+ StrCmp $STATE " (Delete)" WordReplace
+ StrCmp $STATE " (Multiple-replace)" WordReplace
+ StrCmp $STATE "4. WordAdd (Add)" WordAdd
+ StrCmp $STATE " (Delete) " WordAdd
+ StrCmp $STATE "5. WordInsert" WordInsert
+ StrCmp $STATE "6. StrFilter (UpperCase)" StrFilter
+ StrCmp $STATE " (LowerCase)" StrFilter
+ StrCmp $STATE " (Filter)" StrFilter
+ StrCmp $STATE "7. VersionCompare" VersionCompare
+ StrCmp $STATE "8. VersionConvert" VersionConvert
+ Abort
+
+ WordFind:
+ ${WordFind} "$R1" "$R2" "$R4" $R0
+ IfErrors 0 Send
+ StrCpy $0 $R0
+ StrCmp $R0 3 0 +3
+ StrCpy $3 '"+1" "-1" "+1}" "+1{" "#" "/word"'
+ goto error3
+ StrCmp $R0 2 0 error1
+ StrCpy $R4 $R4 '' 1
+ StrCpy $1 $R4 1
+ StrCmp $1 / 0 error2
+ StrCpy $R4 $R4 '' 1
+ StrCpy $R0 '"$R4" no such word.'
+ goto Send
+
+ WordFind2X:
+ ${WordFind2X} "$R1" "$R2" "$R3" "$R4" $R0
+ IfErrors 0 Send
+ StrCpy $0 $R0
+ StrCmp $R0 3 0 +3
+ StrCpy $3 '"+1" "-1"'
+ goto error3
+ StrCmp $R0 2 +3
+ StrCpy $R0 '"$R2...$R3" no words found.'
+ goto Send
+ StrCpy $R4 $R4 '' 1
+ StrCpy $1 $R4 1
+ StrCmp $1 / 0 +2
+ StrCpy $R4 $R4 '' 1
+ StrCpy $R0 '"$R4" no such word.'
+ goto Send
+
+ WordReplace:
+ ${WordReplace} "$R1" "$R2" "$R3" "$R4" $R0
+ IfErrors 0 Send
+ StrCpy $0 $R0
+ StrCmp $R0 3 0 +3
+ StrCpy $3 '"+1" "+1*" "+" "+*" "{}"'
+ goto error3
+ StrCmp $R0 2 0 error1
+ StrCpy $R4 $R4 '' 1
+ goto error2
+
+ WordAdd:
+ ${WordAdd} "$R1" "$R2" "$R4" $R0
+ IfErrors 0 Send
+ StrCpy $0 $R0
+ StrCmp $R0 3 0 error1empty
+ StrCpy $3 '"+text" "-text"'
+ goto error3
+
+ WordInsert:
+ ${WordInsert} "$R1" "$R2" "$R3" "$R4" $R0
+ IfErrors 0 Send
+ StrCpy $0 $R0
+ StrCmp $R0 3 0 +3
+ StrCpy $3 '"+1" "-1"'
+ goto error3
+ StrCmp $R0 2 0 error1empty
+ StrCpy $R4 $R4 '' 1
+ goto error2
+
+ StrFilter:
+ ${StrFilter} "$R1" "$R2" "$R3" "$R4" $R0
+ IfErrors 0 Send
+ StrCpy $R0 'Syntax error'
+ goto Send
+
+ VersionCompare:
+ ${VersionCompare} "$R1" "$R2" $R0
+ goto Send
+
+ VersionConvert:
+ ${VersionConvert} "$R1" "$R2" $R0
+ goto Send
+
+ error3:
+ StrCpy $R0 '"$R4" syntax error ($3)'
+ goto Send
+ error2:
+ StrCpy $R0 '"$R4" no such word number'
+ goto Send
+ error1empty:
+ StrCpy $R0 '"$R2" delimiter is empty'
+ goto Send
+ error1:
+ StrCpy $R0 '"$R2" delimiter not found in string'
+ goto Send
+
+ Send:
+ GetDlgItem $1 $HWND 1205
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$R0"
+ GetDlgItem $1 $HWND 1206
+ SendMessage $1 ${WM_SETTEXT} 1 "STR:$0"
+ abort
+FunctionEnd
+
+Function .onInit
+ InitPluginsDir
+ GetTempFileName $INI $PLUGINSDIR
+ File /oname=$INI "WordFunc.ini"
+FunctionEnd
+
+Page instfiles
+
+Section "Empty"
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/WordFuncTest.nsi b/KattekerCreator/nsis/Examples/WordFuncTest.nsi
new file mode 100644
index 0000000..e9d1160
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/WordFuncTest.nsi
@@ -0,0 +1,610 @@
+;_____________________________________________________________________________
+;
+; Word Functions Test
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Word Functions Test"
+OutFile "WordFuncTest.exe"
+Caption "$(^Name)"
+ShowInstDetails show
+XPStyle on
+RequestExecutionLevel user
+
+Var FUNCTION
+Var OUT
+
+!include "WordFunc.nsh"
+
+;############### INSTALL ###############
+
+!define StackVerificationStart `!insertmacro StackVerificationStart`
+!macro StackVerificationStart _FUNCTION
+ StrCpy $FUNCTION ${_FUNCTION}
+ Call StackVerificationStart
+!macroend
+
+!define StackVerificationEnd `!insertmacro StackVerificationEnd`
+!macro StackVerificationEnd
+ Call StackVerificationEnd
+!macroend
+
+Function StackVerificationStart
+ StrCpy $0 !0
+ StrCpy $1 !1
+ StrCpy $2 !2
+ StrCpy $3 !3
+ StrCpy $4 !4
+ StrCpy $5 !5
+ StrCpy $6 !6
+ StrCpy $7 !7
+ StrCpy $8 !8
+ StrCpy $9 !9
+ StrCpy $R0 !R0
+ StrCpy $R1 !R1
+ StrCpy $R2 !R2
+ StrCpy $R3 !R3
+ StrCpy $R4 !R4
+ StrCpy $R5 !R5
+ StrCpy $R6 !R6
+ StrCpy $R7 !R7
+ StrCpy $R8 !R8
+ StrCpy $R9 !R9
+FunctionEnd
+
+Function StackVerificationEnd
+ IfErrors +3
+ DetailPrint 'PASSED $FUNCTION no errors'
+ goto +2
+ DetailPrint 'FAILED $FUNCTION error'
+
+ StrCmp $0 '!0' 0 error
+ StrCmp $1 '!1' 0 error
+ StrCmp $2 '!2' 0 error
+ StrCmp $3 '!3' 0 error
+ StrCmp $4 '!4' 0 error
+ StrCmp $5 '!5' 0 error
+ StrCmp $6 '!6' 0 error
+ StrCmp $7 '!7' 0 error
+ StrCmp $8 '!8' 0 error
+ StrCmp $9 '!9' 0 error
+ StrCmp $R0 '!R0' 0 error
+ StrCmp $R1 '!R1' 0 error
+ StrCmp $R2 '!R2' 0 error
+ StrCmp $R3 '!R3' 0 error
+ StrCmp $R4 '!R4' 0 error
+ StrCmp $R5 '!R5' 0 error
+ StrCmp $R6 '!R6' 0 error
+ StrCmp $R7 '!R7' 0 error
+ StrCmp $R8 '!R8' 0 error
+ StrCmp $R9 '!R9' 0 error
+ DetailPrint 'PASSED $FUNCTION stack'
+ goto end
+
+ error:
+ DetailPrint 'FAILED $FUNCTION stack'
+; MessageBox MB_OKCANCEL '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}' IDOK +2
+; quit
+
+ end:
+FunctionEnd
+
+
+
+Section WordFind
+ ${StackVerificationStart} WordFind
+
+ ${WordFind} '||io.sys|||Program Files|||WINDOWS' '||' '-02' $OUT
+ StrCmp $OUT '|Program Files' 0 error
+
+ ${WordFind} '||io.sys||||Program Files||||WINDOWS' '||' '-2' $OUT
+ StrCmp $OUT 'Program Files' 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '-2}' $OUT
+ StrCmp $OUT '|logo.sys|||WINDOWS' 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '#' $OUT
+ StrCmp $OUT '3' 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '*' $OUT
+ StrCmp $OUT '2' 0 error
+
+ ${WordFind} 'C:\io.sys|||Program Files|||WINDOWS' '||' '/|Program Files' $OUT
+ StrCmp $OUT '2' 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '+2}}' $OUT
+ StrCmp $OUT '|||WINDOWS' 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '+2{}' $OUT
+ StrCmp $OUT 'C:\io.sys|||WINDOWS' 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '+2*}' $OUT
+ StrCmp $OUT '|logo.sys|||WINDOWS' 0 error
+
+ ${WordFind} 'C:\\Program Files\\NSIS\\NSIS.chm' '\' '-2{*' $OUT
+ StrCmp $OUT 'C:\\Program Files\\NSIS' 0 error
+
+ ${WordFind} 'C:\io.sys|||Program Files|||WINDOWS|||' '||' '-1' $OUT
+ StrCmp $OUT '|' 0 error
+
+ ${WordFind} '||C:\io.sys|||logo.sys|||WINDOWS||' '||' '-1}' $OUT
+ StrCmp $OUT '' 0 error
+
+ ${WordFind} '||C:\io.sys|||logo.sys|||WINDOWS||' '||' '+1{' $OUT
+ StrCmp $OUT '' 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys' '_' 'E+1' $OUT
+ IfErrors 0 error
+ StrCmp $OUT 1 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys|||' '\' 'E+3' $OUT
+ IfErrors 0 error
+ StrCmp $OUT 2 0 error
+
+ ${WordFind} 'C:\io.sys|||logo.sys' '\' 'E1' $OUT
+ IfErrors 0 error
+ StrCmp $OUT 3 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordFindS
+ ${StackVerificationStart} WordFindS
+
+ ${WordFindS} 'C:\io.sys|||Program Files|||WINDOWS' '||' '/|PROGRAM FILES' $OUT
+ StrCmp $OUT 'C:\io.sys|||Program Files|||WINDOWS' 0 error
+
+ ${WordFindS} 'C:\io.sys|||Program Files|||WINDOWS' '||' '/|Program Files' $OUT
+ StrCmp $OUT '2' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordFind2X
+ ${StackVerificationStart} WordFind2X
+
+ ${WordFind2X} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT
+ StrCmp $OUT 'logo.sys' 0 error
+
+ ${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1' $OUT
+ StrCmp $OUT 'logo' 0 error
+
+ ${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1{{' $OUT
+ StrCmp $OUT 'C:\WINDOWS C:\io.sys C:' 0 error
+
+ ${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1{}' $OUT
+ StrCmp $OUT 'C:\WINDOWS C:\io.sys C:sys' 0 error
+
+ ${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1{*' $OUT
+ StrCmp $OUT 'C:\WINDOWS C:\io.sys C:\logo.' 0 error
+
+ ${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '/logo' $OUT
+ StrCmp $OUT '2' 0 error
+
+ ${WordFind2X} '||a||b||c' '||' '||' 'E+1' $OUT
+ StrCmp $OUT 'a' 0 error
+
+ ${WordFind2X} '[io.sys];[C:\logo.sys]' '\' '];' 'E+1' $OUT
+ IfErrors 0 error
+ StrCmp $OUT 1 0 error
+
+ ${WordFind2X} '[io.sys];[C:\logo.sys]' '[' '];' 'E+2' $OUT
+ IfErrors 0 error
+ StrCmp $OUT 2 0 error
+
+ ${WordFind2X} '[io.sys];[C:\logo.sys]' '\' '];' 'E2' $OUT
+ IfErrors 0 error
+ StrCmp $OUT 3 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordFind2XS
+ ${StackVerificationStart} WordFind2XS
+
+ ${WordFind2XS} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '/LOGO' $OUT
+ StrCmp $OUT 'C:\WINDOWS C:\io.sys C:\logo.sys' 0 error
+
+ ${WordFind2XS} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '/logo' $OUT
+ StrCmp $OUT '2' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordFind3X
+ ${StackVerificationStart} WordFind3X
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT
+ StrCmp $OUT '1.AAB' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1' $OUT
+ StrCmp $OUT '2.BAA' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1{{' $OUT
+ StrCmp $OUT '[1.AAB];' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1{}' $OUT
+ StrCmp $OUT '[1.AAB];[3.BBB];' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1{*' $OUT
+ StrCmp $OUT '[1.AAB];[2.BAA];' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '/2.BAA' $OUT
+ StrCmp $OUT '2' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'XX' '];' 'E+1' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '1' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' 'E+3' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '2' 0 error
+
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' 'E3' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '3' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordFind3XS
+ ${StackVerificationStart} WordFind3XS
+
+ ${WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '/2.baa' $OUT
+ StrCmp $OUT '[1.AAB];[2.BAA];[3.BBB];' 0 error
+
+ ${WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '/2.BAA' $OUT
+ StrCmp $OUT '2' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordReplace
+ ${StackVerificationStart} WordReplace
+
+ ${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.bmp C:\WINDOWS' 0 error
+
+ ${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' '' '+' $OUT
+ StrCmp $OUT 'C:\io. C:\logo. C:\WINDOWS' 0 error
+
+ ${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'C:\io.sys' '' '+' $OUT
+ StrCmp $OUT ' C:\logo.sys C:\WINDOWS' 0 error
+
+ ${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' ' ' ' ' '+1*' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.sys C:\WINDOWS' 0 error
+
+ ${WordReplace} 'C:\io.sys C:\logo.sysSYSsys C:\WINDOWS' 'sys' 'bmp' '+*' $OUT
+ StrCmp $OUT 'C:\io.bmp C:\logo.bmp C:\WINDOWS' 0 error
+
+ ${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{' $OUT
+ StrCmp $OUT '||C:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 0 error
+
+ ${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '}' $OUT
+ StrCmp $OUT 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWS|||' 0 error
+
+ ${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{}' $OUT
+ StrCmp $OUT '||C:\io.sys C:\logo.sys C:\WINDOWS|||' 0 error
+
+ ${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{*' $OUT
+ StrCmp $OUT '|C:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 0 error
+
+ ${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '}*' $OUT
+ StrCmp $OUT 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWS|' 0 error
+
+ ${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{}*' $OUT
+ StrCmp $OUT '|C:\io.sys C:\logo.sys C:\WINDOWS|' 0 error
+
+ ${WordReplace} 'sysSYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{}*' $OUT
+ StrCmp $OUT '|C:\io.sys C:\logo.sys C:\WINDOWS|' 0 error
+
+ ${WordReplace} 'C:\io.sys C:\logo.sys' '#sys' '|sys|' 'E+1' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '1' 0 error
+
+ ${WordReplace} 'C:\io.sys C:\logo.sys' '.sys' '|sys|' 'E+3' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '2' 0 error
+
+ ${WordReplace} 'C:\io.sys C:\logo.sys' '.sys' '|sys|' 'E3' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '3' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordReplaceS
+ ${StackVerificationStart} WordReplaceS
+
+ ${WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.sys C:\WINDOWS' 0 error
+
+ ${WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'sys' 'bmp' '+2' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.bmp C:\WINDOWS' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordAdd
+ ${StackVerificationStart} WordAdd
+
+ ${WordAdd} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
+ StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\config.sys' 0 error
+
+ ${WordAdd} 'C:\io.sys C:\logo.sys C:\WINDOWS' ' ' '-C:\WINDOWS C:\config.sys C:\IO.SYS' $OUT
+ StrCmp $OUT 'C:\logo.sys' 0 error
+
+ ${WordAdd} 'C:\io.sys' ' ' '+C:\WINDOWS C:\config.sys C:\IO.SYS' $OUT
+ StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\config.sys' 0 error
+
+ ${WordAdd} 'C:\io.sys C:\logo.sys C:\WINDOWS' ' ' '-C:\WINDOWS' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.sys' 0 error
+
+ ${WordAdd} 'C:\io.sys C:\logo.sys' ' ' '+C:\logo.sys' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.sys' 0 error
+
+ ${WordAdd} 'C:\io.sys C:\logo.sys' ' ' 'E-' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.sys' 0 error
+ IfErrors error
+
+ ${WordAdd} 'C:\io.sys C:\logo.sys' '' 'E-C:\logo.sys' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '1' 0 error
+
+ ${WordAdd} 'C:\io.sys C:\logo.sys' '' 'EC:\logo.sys' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '3' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordAddS
+ ${StackVerificationStart} WordAddS
+
+ ${WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\windows C:\config.sys' $OUT
+ StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\windows C:\config.sys' 0 error
+
+ ${WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
+ StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\config.sys' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordInsert
+ ${StackVerificationStart} WordInsert
+
+ ${WordInsert} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT
+ StrCmp $OUT 'C:\io.sys C:\logo.sys C:\WINDOWS' 0 error
+
+ ${WordInsert} 'C:\io.sys' ' ' 'C:\WINDOWS' '+2' $OUT
+ StrCmp $OUT 'C:\io.sys C:\WINDOWS' 0 error
+
+ ${WordInsert} '' ' ' 'C:\WINDOWS' '+1' $OUT
+ StrCmp $OUT 'C:\WINDOWS ' 0 error
+
+ ${WordInsert} 'C:\io.sys C:\logo.sys' '' 'C:\logo.sys' 'E+1' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '1' 0 error
+
+ ${WordInsert} 'C:\io.sys C:\logo.sys' ' ' 'C:\logo.sys' 'E+4' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '2' 0 error
+
+ ${WordInsert} 'C:\io.sys C:\logo.sys' '' 'C:\logo.sys' 'E1' $OUT
+ IfErrors 0 error
+ StrCmp $OUT '3' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WordInsertS
+ ${StackVerificationStart} WordInsertS
+
+ ${WordInsertS} 'C:\io.sys x C:\logo.sys' ' X ' 'C:\NTLDR' '+2' $OUT
+ StrCmp $OUT 'C:\io.sys x C:\logo.sys X C:\NTLDR' 0 error
+
+ ${WordInsertS} 'C:\io.sys x C:\logo.sys' ' x ' 'C:\NTLDR' '+2' $OUT
+ StrCmp $OUT 'C:\io.sys x C:\NTLDR x C:\logo.sys' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section StrFilter
+ ${StackVerificationStart} StrFilter
+
+ ${StrFilter} '123abc 456DEF 7890|%#' '+' '' '' $OUT
+ IfErrors error
+ StrCmp $OUT '123ABC 456DEF 7890|%#' 0 error
+
+ ${StrFilter} '123abc 456DEF 7890|%#' '-' 'ef' '' $OUT
+ IfErrors error
+ StrCmp $OUT '123abc 456dEF 7890|%#' 0 error
+
+ ${StrFilter} '123abc 456DEF 7890|%#' '2' '|%' '' $OUT
+ IfErrors error
+ StrCmp $OUT 'abcDEF|%' 0 error
+
+ ${StrFilter} '123abc 456DEF 7890|%#' '13' 'af' '4590' $OUT
+ IfErrors error
+ StrCmp $OUT '123a 6F 78|%#' 0 error
+
+ ${StrFilter} '123abc 456DEF 7890|%#' '+12' 'b' 'def' $OUT
+ IfErrors error
+ StrCmp $OUT '123AbC4567890' 0 error
+
+ ${StrFilter} '123abc 456DEF 7890|%#' '+12' 'b' 'def' $OUT
+ IfErrors error
+ StrCmp $OUT '123AbC4567890' 0 error
+
+ ${StrFilter} '123abc 456DEF 7890|%#' '123' 'b' 'def' $OUT
+ IfErrors 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section StrFilterS
+ ${StackVerificationStart} StrFilterS
+
+ ${StrFilterS} '123abc 456DEF 7890|%#' '13' 'af' '4590' $OUT
+ IfErrors error
+ StrCmp $OUT '123a 6 78|%#' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section VersionCompare
+ ${StackVerificationStart} VersionCompare
+
+ ${VersionCompare} '1.1.1.9' '1.1.1.01' $OUT
+ StrCmp $OUT '1' 0 error
+
+ ${VersionCompare} '1.1.1.1' '1.1.1.10' $OUT
+ StrCmp $OUT '2' 0 error
+
+ ${VersionCompare} '91.1.1.1' '101.1.1.9' $OUT
+ StrCmp $OUT '2' 0 error
+
+ ${VersionCompare} '1.1.1.1' '1.1.1.1' $OUT
+ StrCmp $OUT '0' 0 error
+
+ ${VersionCompare} '1.1.1.9' '1.1.1.10' $OUT
+ StrCmp $OUT '2' 0 error
+
+ ${VersionCompare} '1.1.1.0' '1.1.1' $OUT
+ StrCmp $OUT '0' 0 error
+
+ ${VersionCompare} '1.1.0.0' '1.1' $OUT
+ StrCmp $OUT '0' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section VersionConvert
+ ${StackVerificationStart} VersionConvert
+
+ ${VersionConvert} '9.0a' '' $OUT
+ StrCmp $OUT '9.0.01' 0 error
+
+ ${VersionConvert} '9.0c' '' $OUT
+ StrCmp $OUT '9.0.03' 0 error
+
+ ${VersionConvert} '0.15c-9m' '' $OUT
+ StrCmp $OUT '0.15.03.9.13' 0 error
+
+ ${VersionConvert} '0.15c+' 'abcdefghijklmnopqrstuvwxyz+' $OUT
+ StrCmp $OUT '0.15.0327' 0 error
+
+ ${VersionConvert} '0.0xa12.x.ax|.|.|x|a|.3|a.4.||5.|' '' $OUT
+ StrCmp $OUT '0.0.2401.12.24.0124.24.01.3.01.4.5' 0 error
+
+ goto +2
+ error:
+ SetErrors
+
+ ${StackVerificationEnd}
+SectionEnd
+
+
+Section WriteUninstaller
+ goto +2
+ WriteUninstaller '$EXEDIR\un.WordFuncTest.exe'
+SectionEnd
+
+
+
+;############### UNINSTALL ###############
+
+Section un.Uninstall
+ ${WordFind} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT
+ ${WordFindS} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT
+ ${WordFind2X} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT
+ ${WordFind2XS} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT
+ ${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT
+ ${WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT
+ ${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
+ ${WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
+ ${WordAdd} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
+ ${WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
+ ${WordInsert} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT
+ ${WordInsertS} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT
+ ${StrFilter} '123abc 456DEF 7890|%#' '+' '' '' $OUT
+ ${StrFilterS} '123abc 456DEF 7890|%#' '+' '' '' $OUT
+ ${VersionCompare} '1.1.1.9' '1.1.1.01' $OUT
+ ${VersionConvert} '9.0a' '' $OUT
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/bigtest.nsi b/KattekerCreator/nsis/Examples/bigtest.nsi
new file mode 100644
index 0000000..c4bcb04
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/bigtest.nsi
@@ -0,0 +1,330 @@
+; bigtest.nsi
+;
+; This script attempts to test most of the functionality of the NSIS exehead.
+
+;--------------------------------
+
+!ifdef HAVE_UPX
+!packhdr tmp.dat "upx\upx -9 tmp.dat"
+!endif
+
+!ifdef NOCOMPRESS
+SetCompress off
+!endif
+
+;--------------------------------
+
+Name "BigNSISTest"
+Caption "NSIS Big Test"
+Icon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-install.ico"
+OutFile "bigtest.exe"
+
+SetDateSave on
+SetDatablockOptimize on
+CRCCheck on
+SilentInstall normal
+BGGradient 000000 800000 FFFFFF
+InstallColors FF8080 000030
+XPStyle on
+
+InstallDir "$PROGRAMFILES\NSISTest\BigNSISTest"
+InstallDirRegKey HKLM "Software\NSISTest\BigNSISTest" "Install_Dir"
+
+CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
+
+LicenseText "A test text, make sure it's all there"
+LicenseData "bigtest.nsi"
+
+RequestExecutionLevel admin
+ManifestSupportedOS all
+
+;--------------------------------
+
+Page license
+Page components
+Page directory
+Page instfiles
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
+;--------------------------------
+
+!ifndef NOINSTTYPES ; only if not defined
+ InstType "Most"
+ InstType "Full"
+ InstType "More"
+ InstType "Base"
+ ;InstType /NOCUSTOM
+ ;InstType /COMPONENTSONLYONCUSTOM
+!endif
+
+AutoCloseWindow false
+ShowInstDetails show
+
+;--------------------------------
+
+Section "" ; empty string makes it hidden, so would starting with -
+
+ ; write reg info
+ StrCpy $1 "Hello World"
+ DetailPrint "I like to be able to see what is going on (debug) $1"
+ WriteRegStr HKLM SOFTWARE\NSISTest\BigNSISTest "Install_Dir" "$INSTDIR"
+
+ ; write uninstall strings
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "DisplayName" "BigNSISTest (remove only)"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "UninstallString" '"$INSTDIR\bt-uninst.exe"'
+
+ SetOutPath $INSTDIR
+ File /a "silent.nsi"
+ CreateDirectory "$INSTDIR\MyProjectFamily\MyProject" ; 2 recursively create a directory for fun.
+ WriteUninstaller "$INSTDIR\bt-uninst.exe"
+
+ Nop ; for fun
+
+SectionEnd
+
+Section "TempTest"
+
+SectionIn 1 2 3
+ Start: MessageBox MB_OK "Start:"
+
+ MessageBox MB_YESNO "Goto MyLabel" IDYES MyLabel
+
+ MessageBox MB_OK "Right before MyLabel:"
+
+ MyLabel: MessageBox MB_OK "MyLabel:"
+
+ MessageBox MB_OK "Right after MyLabel:"
+
+ MessageBox MB_YESNO "Goto Start:?" IDYES Start
+
+SectionEnd
+
+SectionGroup /e SectionGroup1
+
+Section "Test Registry/INI functions"
+
+SectionIn 1 4 3
+
+ WriteRegStr HKLM SOFTWARE\NSISTest\BigNSISTest "StrTest_INSTDIR" "$INSTDIR"
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_0xDEADBEEF" 0xdeadbeef
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_123456" 123456
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_0123" 0123
+ WriteRegBin HKLM SOFTWARE\NSISTest\BigNSISTest "BinTest_deadbeef01f00dbeef" "DEADBEEF01F00DBEEF"
+ StrCpy $8 "$SYSDIR\IniTest"
+ WriteINIStr "$INSTDIR\test.ini" "MySection" "Value1" $8
+ WriteINIStr "$INSTDIR\test.ini" "MySectionIni" "Value1" $8
+ WriteINIStr "$INSTDIR\test.ini" "MySectionIni" "Value2" $8
+ WriteINIStr "$INSTDIR\test.ini" "IniOn" "Value1" $8
+
+ Call MyFunctionTest
+
+ DeleteINIStr "$INSTDIR\test.ini" "IniOn" "Value1"
+ DeleteINISec "$INSTDIR\test.ini" "MySectionIni"
+
+ ReadINIStr $1 "$INSTDIR\test.ini" "MySectionIni" "Value1"
+ StrCmp $1 "" INIDelSuccess
+ MessageBox MB_OK "DeleteINISec failed"
+ INIDelSuccess:
+
+ ClearErrors
+ ReadRegStr $1 HKCR "software\microsoft" xyz_cc_does_not_exist
+ IfErrors 0 NoError
+ MessageBox MB_OK "could not read from HKCR\software\microsoft\xyz_cc_does_not_exist"
+ Goto ErrorYay
+ NoError:
+ MessageBox MB_OK "read '$1' from HKCR\software\microsoft\xyz_cc_does_not_exist"
+ ErrorYay:
+
+SectionEnd
+
+Section "Test CreateShortcut"
+
+ SectionIn 1 2 3
+
+ Call CSCTest
+
+SectionEnd
+
+SectionGroup Group2
+
+!define ASSERT `!insertmacro ASSERT "${U+24}{__FILE__}" ${U+24}{__LINE__} `
+!macro ASSERT __file __line __xpr
+${__xpr} +2
+MessageBox MB_ICONSTOP `ASSERT: ${__xpr} (${__file}:${__line})`
+!macroend
+
+Section "Integer"
+IntOp $0 0xffffffff >> 31
+${ASSERT} `IntCmpU $0 -1`
+IntOp $0 0xffffffff >>> 31
+${ASSERT} `IntCmpU $0 1`
+IntOp $0 1 << 31
+${ASSERT} `IntCmpU $0 0x80000000`
+IntOp $0 0x80000000 ^ 0x40000000
+${ASSERT} `IntCmpU $0 0xC0000000`
+ClearErrors
+IntOp $0 1 / 0
+${ASSERT} `IfErrors ` ; Division by zero must set the error flag
+${ASSERT} `IntCmpU $0 0` ; Unspecified result, hopefully it's zero
+SectionEnd
+
+Section "Test Branching"
+
+ BeginTestSection:
+ SectionIn 1 2 3
+
+ SetOutPath $INSTDIR
+
+ IfFileExists "$INSTDIR\LogicLib.nsi" 0 BranchTest69
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to overwrite $INSTDIR\LogicLib.nsi?" IDNO NoOverwrite ; skipped if file doesn't exist
+
+ BranchTest69:
+
+ SetOverwrite ifnewer ; NOT AN INSTRUCTION, NOT COUNTED IN SKIPPINGS
+
+ NoOverwrite:
+
+ File "LogicLib.nsi" ; skipped if answered no
+ SetOverwrite try ; NOT AN INSTRUCTION, NOT COUNTED IN SKIPPINGS
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to skip the rest of this section?" IDYES EndTestBranch
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to go back to the beginning of this section?" IDYES BeginTestSection
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to hide the installer and wait five seconds?" IDNO NoHide
+
+ HideWindow
+ Sleep 5000
+ BringToFront
+
+ NoHide:
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to call the function 5 times?" IDNO NoRecurse
+
+ StrCpy $1 "x"
+
+ LoopTest:
+
+ Call myfunc
+ StrCpy $1 "x$1"
+ StrCmp $1 "xxxxxx" 0 LoopTest
+
+ NoRecurse:
+
+ EndTestBranch:
+
+SectionEnd
+
+SectionGroupEnd
+
+Section "Test CopyFiles"
+
+ SectionIn 1 2 3
+
+ SetOutPath $INSTDIR\cpdest
+ CopyFiles "$WINDIR\*.ini" "$INSTDIR\cpdest" 0
+
+SectionEnd
+
+SectionGroupEnd
+
+Section "Test Exec functions" TESTIDX
+
+ SectionIn 1 2 3
+
+ SearchPath $1 notepad.exe
+
+ MessageBox MB_OK "notepad.exe=$1"
+ Exec '"$1"'
+ ExecShell "open" '"$INSTDIR"'
+ Sleep 500
+ BringToFront
+
+SectionEnd
+
+Section "Test ActiveX control registration"
+
+ SectionIn 2
+
+ UnRegDLL "$SYSDIR\spin32.ocx"
+ Sleep 1000
+ RegDLL "$SYSDIR\spin32.ocx"
+ Sleep 1000
+
+SectionEnd
+
+;--------------------------------
+
+Function "CSCTest"
+
+ CreateDirectory "$SMPROGRAMS\Big NSIS Test"
+ SetOutPath $INSTDIR ; for working directory
+ CreateShortcut "$SMPROGRAMS\Big NSIS Test\Uninstall BIG NSIS Test.lnk" "$INSTDIR\bt-uninst.exe" ; use defaults for parameters, icon, etc.
+ ; this one will use notepad's icon, start it minimized, and give it a hotkey (of Ctrl+Shift+Q)
+ CreateShortcut "$SMPROGRAMS\Big NSIS Test\silent.nsi.lnk" "$INSTDIR\silent.nsi" "" "$WINDIR\notepad.exe" 0 SW_SHOWMINIMIZED CONTROL|SHIFT|Q
+ CreateShortcut "$SMPROGRAMS\Big NSIS Test\TheDir.lnk" "$INSTDIR\" "" "" 0 SW_SHOWMAXIMIZED CONTROL|SHIFT|Z
+
+FunctionEnd
+
+Function myfunc
+
+ StrCpy $2 "MyTestVar=$1"
+ MessageBox MB_OK "myfunc: $2"
+
+FunctionEnd
+
+Function MyFunctionTest
+
+ ReadINIStr $1 "$INSTDIR\test.ini" "MySectionIni" "Value1"
+ StrCmp $1 $8 NoFailedMsg
+ MessageBox MB_OK "WriteINIStr failed"
+
+ NoFailedMsg:
+
+FunctionEnd
+
+Function .onSelChange
+
+ SectionGetText ${TESTIDX} $0
+ StrCmp $0 "" e
+ SectionSetText ${TESTIDX} ""
+ Goto e2
+e:
+ SectionSetText ${TESTIDX} "TextInSection"
+e2:
+
+FunctionEnd
+
+;--------------------------------
+
+; Uninstaller
+
+UninstallText "This will uninstall example2. Hit next to continue."
+UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-uninstall.ico"
+
+Section "Uninstall"
+
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest"
+ DeleteRegKey HKLM "SOFTWARE\NSISTest\BigNSISTest"
+ Delete "$INSTDIR\silent.nsi"
+ Delete "$INSTDIR\LogicLib.nsi"
+ Delete "$INSTDIR\bt-uninst.exe"
+ Delete "$INSTDIR\test.ini"
+ Delete "$SMPROGRAMS\Big NSIS Test\*.*"
+ RMDir "$SMPROGRAMS\BiG NSIS Test"
+
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to remove the directory $INSTDIR\cpdest?" IDNO NoDelete
+ Delete "$INSTDIR\cpdest\*.*"
+ RMDir "$INSTDIR\cpdest" ; skipped if no
+ NoDelete:
+
+ RMDir "$INSTDIR\MyProjectFamily\MyProject"
+ RMDir "$INSTDIR\MyProjectFamily"
+ RMDir "$INSTDIR"
+
+ IfFileExists "$INSTDIR" 0 NoErrorMsg
+ MessageBox MB_OK "Note: $INSTDIR could not be removed!" IDOK 0 ; skipped if file doesn't exist
+ NoErrorMsg:
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/example1.nsi b/KattekerCreator/nsis/Examples/example1.nsi
new file mode 100644
index 0000000..fd549c0
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/example1.nsi
@@ -0,0 +1,40 @@
+; example1.nsi
+;
+; This script is perhaps one of the simplest NSIs you can make. All of the
+; optional settings are left to their default settings. The installer simply
+; prompts the user asking them where to install, and drops a copy of example1.nsi
+; there.
+
+;--------------------------------
+
+; The name of the installer
+Name "Example1"
+
+; The file to write
+OutFile "example1.exe"
+
+; The default installation directory
+InstallDir $DESKTOP\Example1
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel user
+
+;--------------------------------
+
+; Pages
+
+Page directory
+Page instfiles
+
+;--------------------------------
+
+; The stuff to install
+Section "" ;No components page, name is not important
+
+ ; Set output path to the installation directory.
+ SetOutPath $INSTDIR
+
+ ; Put file there
+ File example1.nsi
+
+SectionEnd ; end the section
diff --git a/KattekerCreator/nsis/Examples/example2.nsi b/KattekerCreator/nsis/Examples/example2.nsi
new file mode 100644
index 0000000..1e8cfde
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/example2.nsi
@@ -0,0 +1,92 @@
+; example2.nsi
+;
+; This script is based on example1.nsi, but it remember the directory,
+; has uninstall support and (optionally) installs start menu shortcuts.
+;
+; It will install example2.nsi into a directory that the user selects,
+
+;--------------------------------
+
+; The name of the installer
+Name "Example2"
+
+; The file to write
+OutFile "example2.exe"
+
+; The default installation directory
+InstallDir $PROGRAMFILES\Example2
+
+; Registry key to check for directory (so if you install again, it will
+; overwrite the old one automatically)
+InstallDirRegKey HKLM "Software\NSIS_Example2" "Install_Dir"
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+;--------------------------------
+
+; Pages
+
+Page components
+Page directory
+Page instfiles
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
+;--------------------------------
+
+; The stuff to install
+Section "Example2 (required)"
+
+ SectionIn RO
+
+ ; Set output path to the installation directory.
+ SetOutPath $INSTDIR
+
+ ; Put file there
+ File "example2.nsi"
+
+ ; Write the installation path into the registry
+ WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR"
+
+ ; Write the uninstall keys for Windows
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "DisplayName" "NSIS Example2"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "NoRepair" 1
+ WriteUninstaller "$INSTDIR\uninstall.exe"
+
+SectionEnd
+
+; Optional section (can be disabled by the user)
+Section "Start Menu Shortcuts"
+
+ CreateDirectory "$SMPROGRAMS\Example2"
+ CreateShortcut "$SMPROGRAMS\Example2\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+ CreateShortcut "$SMPROGRAMS\Example2\Example2 (MakeNSISW).lnk" "$INSTDIR\example2.nsi" "" "$INSTDIR\example2.nsi" 0
+
+SectionEnd
+
+;--------------------------------
+
+; Uninstaller
+
+Section "Uninstall"
+
+ ; Remove registry keys
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2"
+ DeleteRegKey HKLM SOFTWARE\NSIS_Example2
+
+ ; Remove files and uninstaller
+ Delete $INSTDIR\example2.nsi
+ Delete $INSTDIR\uninstall.exe
+
+ ; Remove shortcuts, if any
+ Delete "$SMPROGRAMS\Example2\*.*"
+
+ ; Remove directories used
+ RMDir "$SMPROGRAMS\Example2"
+ RMDir "$INSTDIR"
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/gfx.nsi b/KattekerCreator/nsis/Examples/gfx.nsi
new file mode 100644
index 0000000..05af852
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/gfx.nsi
@@ -0,0 +1,123 @@
+; gfx.nsi
+;
+; This script shows some examples of using all of the new
+; graphic related additions introduced in NSIS 2
+;
+; Written by Amir Szkeley 22nd July 2002
+
+;--------------------------------
+
+!macro BIMAGE IMAGE PARMS
+ Push $0
+ GetTempFileName $0
+ File /oname=$0 "${IMAGE}"
+ SetBrandingImage ${PARMS} $0
+ Delete $0
+ Pop $0
+!macroend
+
+;--------------------------------
+
+Name "Graphical effects"
+
+OutFile "gfx.exe"
+
+; Adds an XP manifest to the installer
+XPStyle on
+
+; Add branding image to the installer (an image placeholder on the side).
+; It is not enough to just add the placeholder, we must set the image too...
+; We will later set the image in every pre-page function.
+; We can also set just one persistent image in .onGUIInit
+AddBrandingImage left 100u
+
+; Sets the font of the installer
+SetFont "Comic Sans MS" 8
+
+; Just to make it three pages...
+SubCaption 0 ": Yet another page..."
+SubCaption 2 ": Yet another page..."
+LicenseText "License page"
+LicenseData "gfx.nsi"
+DirText "Lets make a third page!"
+
+; Install dir
+InstallDir "${NSISDIR}\Examples"
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel user
+
+;--------------------------------
+
+; Pages
+Page license licenseImage
+Page custom customPage
+Page directory dirImage
+Page instfiles instImage
+
+;--------------------------------
+
+Section ""
+ ; You can also use the BI_NEXT macro here...
+ MessageBox MB_YESNO "We can change the branding image from within a section too!$\nDo you want me to change it?" IDNO done
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Wizard\nsis.bmp" ""
+ done:
+ WriteUninstaller $INSTDIR\uninst.exe
+SectionEnd
+
+;--------------------------------
+
+Function licenseImage
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" /RESIZETOFIT
+ MessageBox MB_YESNO 'Would you like to skip the license page?' IDNO no
+ Abort
+ no:
+FunctionEnd
+
+Function customPage
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp" /RESIZETOFIT
+ MessageBox MB_OK 'This is a nice custom "page" with yet another image :P'
+ #insert install options/start menu/ here
+FunctionEnd
+
+Function dirImage
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Header\win.bmp" /RESIZETOFIT
+FunctionEnd
+
+Function instImage
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp" /RESIZETOFIT
+FunctionEnd
+
+;--------------------------------
+
+; Uninstall pages
+
+UninstPage uninstConfirm un.uninstImage
+UninstPage custom un.customPage
+UninstPage instfiles un.instImage
+
+Function un.uninstImage
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp" /RESIZETOFIT
+FunctionEnd
+
+Function un.customPage
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Header\win.bmp" /RESIZETOFIT
+ MessageBox MB_OK 'This is a nice uninstaller custom "page" with yet another image :P'
+ #insert install options/start menu/ here
+FunctionEnd
+
+Function un.instImage
+ !insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp" /RESIZETOFIT
+FunctionEnd
+
+;--------------------------------
+
+; Uninstaller
+
+; Another page for uninstaller
+UninstallText "Another page..."
+
+Section uninstall
+ MessageBox MB_OK "Bla"
+SectionEnd
+
diff --git a/KattekerCreator/nsis/Examples/languages.nsi b/KattekerCreator/nsis/Examples/languages.nsi
new file mode 100644
index 0000000..3a4d46c
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/languages.nsi
@@ -0,0 +1,191 @@
+; languages.nsi
+;
+; This is an example of a multilingual installer
+; The user can select the language on startup
+
+!pragma warning error all
+
+;--------------------------------
+
+OutFile languages.exe
+
+XPStyle on
+
+RequestExecutionLevel user
+
+;--------------------------------
+
+Page license
+Page components
+Page instfiles
+
+;--------------------------------
+
+; First is default
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Czech.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Dutch.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\French.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\German.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Korean.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Russian.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Spanish.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Swedish.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\TradChinese.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\SimpChinese.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Slovak.nlf"
+
+; License data
+; Not exactly translated, but it shows what's needed
+LicenseLangString myLicenseData ${LANG_ENGLISH} "bigtest.nsi"
+LicenseLangString myLicenseData ${LANG_CZECH} "WordFuncTest.nsi"
+LicenseLangString myLicenseData ${LANG_DUTCH} "waplugin.nsi"
+LicenseLangString myLicenseData ${LANG_FRENCH} "example1.nsi"
+LicenseLangString myLicenseData ${LANG_GERMAN} "example2.nsi"
+LicenseLangString myLicenseData ${LANG_KOREAN} "gfx.nsi"
+LicenseLangString myLicenseData ${LANG_RUSSIAN} "languages.nsi"
+LicenseLangString myLicenseData ${LANG_SPANISH} "LogicLib.nsi"
+LicenseLangString myLicenseData ${LANG_SWEDISH} "makensis.nsi"
+LicenseLangString myLicenseData ${LANG_TRADCHINESE} "one-section.nsi"
+LicenseLangString myLicenseData ${LANG_SIMPCHINESE} "primes.nsi"
+LicenseLangString myLicenseData ${LANG_SLOVAK} "silent.nsi"
+
+LicenseData $(myLicenseData)
+
+; Set name using the normal interface (Name command)
+LangString Name ${LANG_ENGLISH} "English"
+LangString Name ${LANG_CZECH} "Czech"
+LangString Name ${LANG_DUTCH} "Dutch"
+LangString Name ${LANG_FRENCH} "French"
+LangString Name ${LANG_GERMAN} "German"
+LangString Name ${LANG_KOREAN} "Korean"
+LangString Name ${LANG_RUSSIAN} "Russian"
+LangString Name ${LANG_SPANISH} "Spanish"
+LangString Name ${LANG_SWEDISH} "Swedish"
+LangString Name ${LANG_TRADCHINESE} "Traditional Chinese"
+LangString Name ${LANG_SIMPCHINESE} "Simplified Chinese"
+LangString Name ${LANG_SLOVAK} "Slovak"
+
+Name $(Name)
+
+; Directly change the inner lang strings (Same as ComponentText)
+LangString ^ComponentsText ${LANG_ENGLISH} "English component page"
+LangString ^ComponentsText ${LANG_CZECH} "Czech component page"
+LangString ^ComponentsText ${LANG_DUTCH} "Dutch component page"
+LangString ^ComponentsText ${LANG_FRENCH} "French component page"
+LangString ^ComponentsText ${LANG_GERMAN} "German component page"
+LangString ^ComponentsText ${LANG_KOREAN} "Korean component page"
+LangString ^ComponentsText ${LANG_RUSSIAN} "Russian component page"
+LangString ^ComponentsText ${LANG_SPANISH} "Spanish component page"
+LangString ^ComponentsText ${LANG_SWEDISH} "Swedish component page"
+LangString ^ComponentsText ${LANG_TRADCHINESE} "Traditional Chinese component page"
+LangString ^ComponentsText ${LANG_SIMPCHINESE} "Simplified Chinese component page"
+LangString ^ComponentsText ${LANG_SLOVAK} "Slovak component page"
+
+; Set one text for all languages (simply don't use a LangString)
+CompletedText "Languages example completed"
+
+; A LangString for the section name
+LangString Sec1Name ${LANG_ENGLISH} "English section #1"
+LangString Sec1Name ${LANG_CZECH} "Czech section #1"
+LangString Sec1Name ${LANG_DUTCH} "Dutch section #1"
+LangString Sec1Name ${LANG_FRENCH} "French section #1"
+LangString Sec1Name ${LANG_GERMAN} "German section #1"
+LangString Sec1Name ${LANG_KOREAN} "Korean section #1"
+LangString Sec1Name ${LANG_RUSSIAN} "Russian section #1"
+LangString Sec1Name ${LANG_SPANISH} "Spanish section #1"
+LangString Sec1Name ${LANG_SWEDISH} "Swedish section #1"
+LangString Sec1Name ${LANG_TRADCHINESE} "Trandional Chinese section #1"
+LangString Sec1Name ${LANG_SIMPCHINESE} "Simplified Chinese section #1"
+LangString Sec1Name ${LANG_SLOVAK} "Slovak section #1"
+
+; A multilingual message
+LangString Message ${LANG_ENGLISH} "English message"
+LangString Message ${LANG_CZECH} "Czech message"
+LangString Message ${LANG_DUTCH} "Dutch message"
+LangString Message ${LANG_FRENCH} "French message"
+LangString Message ${LANG_GERMAN} "German message"
+LangString Message ${LANG_KOREAN} "Korean message"
+LangString Message ${LANG_RUSSIAN} "Russian message"
+LangString Message ${LANG_SPANISH} "Spanish message"
+LangString Message ${LANG_SWEDISH} "Swedish message"
+LangString Message ${LANG_TRADCHINESE} "Trandional Chinese message"
+LangString Message ${LANG_SIMPCHINESE} "Simplified Chinese message"
+LangString Message ${LANG_SLOVAK} "Slovak message"
+
+;--------------------------------
+
+;Section names set by Language strings
+;It works with ! too
+Section !$(Sec1Name) sec1
+ MessageBox MB_OK $(Message)
+SectionEnd
+
+; The old, slow, wasteful way
+; Look at this section and see why LangString is so much easier
+Section "Section number two"
+ StrCmp $LANGUAGE ${LANG_ENGLISH} 0 +2
+ MessageBox MB_OK "Installing English stuff"
+ StrCmp $LANGUAGE ${LANG_CZECH} 0 +2
+ MessageBox MB_OK "Installing Czech stuff"
+ StrCmp $LANGUAGE ${LANG_DUTCH} 0 +2
+ MessageBox MB_OK "Installing Dutch stuff"
+ StrCmp $LANGUAGE ${LANG_FRENCH} 0 +2
+ MessageBox MB_OK "Installing French stuff"
+ StrCmp $LANGUAGE ${LANG_GERMAN} 0 +2
+ MessageBox MB_OK "Installing German stuff"
+ StrCmp $LANGUAGE ${LANG_KOREAN} 0 +2
+ MessageBox MB_OK "Installing Korean stuff"
+ StrCmp $LANGUAGE ${LANG_RUSSIAN} 0 +2
+ MessageBox MB_OK "Installing Russian stuff"
+ StrCmp $LANGUAGE ${LANG_SPANISH} 0 +2
+ MessageBox MB_OK "Installing Spanish stuff"
+ StrCmp $LANGUAGE ${LANG_SWEDISH} 0 +2
+ MessageBox MB_OK "Installing Swedish stuff"
+ StrCmp $LANGUAGE ${LANG_TRADCHINESE} 0 +2
+ MessageBox MB_OK "Installing Traditional Chinese stuff"
+ StrCmp $LANGUAGE ${LANG_SIMPCHINESE} 0 +2
+ MessageBox MB_OK "Installing Simplified Chinese stuff"
+ StrCmp $LANGUAGE ${LANG_SLOVAK} 0 +2
+ MessageBox MB_OK "Installing Slovak stuff"
+SectionEnd
+
+;--------------------------------
+
+Function .onInit
+
+ ;Language selection dialog
+
+ Push ""
+ Push ${LANG_ENGLISH}
+ Push English
+ Push ${LANG_CZECH}
+ Push Czech
+ Push ${LANG_DUTCH}
+ Push Dutch
+ Push ${LANG_FRENCH}
+ Push French
+ Push ${LANG_GERMAN}
+ Push German
+ Push ${LANG_KOREAN}
+ Push Korean
+ Push ${LANG_RUSSIAN}
+ Push Russian
+ Push ${LANG_SPANISH}
+ Push Spanish
+ Push ${LANG_SWEDISH}
+ Push Swedish
+ Push ${LANG_TRADCHINESE}
+ Push "Traditional Chinese"
+ Push ${LANG_SIMPCHINESE}
+ Push "Simplified Chinese"
+ Push ${LANG_SLOVAK}
+ Push Slovak
+ Push A ; A means auto count languages
+ ; for the auto count to work the first empty push (Push "") must remain
+ LangDLL::LangDialog "Installer Language" "Please select the language of the installer"
+
+ Pop $LANGUAGE
+ StrCmp $LANGUAGE "cancel" 0 +2
+ Abort
+FunctionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/makensis.nsi b/KattekerCreator/nsis/Examples/makensis.nsi
new file mode 100644
index 0000000..30d2074
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/makensis.nsi
@@ -0,0 +1,1107 @@
+;NSIS Setup Script
+;--------------------------------
+
+!pragma warning error all
+!pragma warning warning 7010 ; File /NonFatal
+
+!ifdef VER_MAJOR & VER_MINOR
+ !define /ifndef VER_REVISION 0
+ !define /ifndef VER_BUILD 0
+!endif
+
+!define /ifndef VERSION 'anonymous-build'
+
+;--------------------------------
+;Configuration
+
+!if ${NSIS_PTR_SIZE} > 4
+ !define BITS 64
+ !define NAMESUFFIX " (64 bit)"
+!else
+ !define BITS 32
+ !define NAMESUFFIX ""
+!endif
+
+!ifndef OUTFILE
+ !define OUTFILE "..\nsis${BITS}-${VERSION}-setup.exe"
+ !searchreplace OUTFILE "${OUTFILE}" nsis32 nsis
+!endif
+
+OutFile "${OUTFILE}"
+Unicode true
+SetCompressor /SOLID lzma
+
+InstType "Full"
+InstType "Lite"
+InstType "Minimal"
+
+InstallDir $PROGRAMFILES${BITS}\NSIS
+InstallDirRegKey HKLM Software\NSIS ""
+
+RequestExecutionLevel admin
+
+;--------------------------------
+;Header Files
+
+!include "MUI2.nsh"
+!include "Sections.nsh"
+!include "LogicLib.nsh"
+!include "Memento.nsh"
+!include "WordFunc.nsh"
+!include "Util.nsh"
+
+;--------------------------------
+;Definitions
+
+!define SHCNE_ASSOCCHANGED 0x8000000
+!define SHCNF_IDLIST 0
+
+;--------------------------------
+;Configuration
+
+;Names
+Name "NSIS"
+Caption "NSIS ${VERSION}${NAMESUFFIX} Setup"
+
+!define REG_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
+
+;Memento Settings
+!define MEMENTO_REGISTRY_ROOT HKLM
+!define MEMENTO_REGISTRY_KEY "${REG_UNINST_KEY}"
+
+;Interface Settings
+!define MUI_ABORTWARNING
+
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-install.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-uninstall.ico"
+
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis3-branding.bmp"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\nsis3-branding.bmp"
+
+!define MUI_COMPONENTSPAGE_SMALLDESC
+
+;Pages
+!define MUI_WELCOMEPAGE_TITLE "Welcome to the NSIS ${VERSION} Setup Wizard"
+!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of NSIS (Nullsoft Scriptable Install System) ${VERSION}, the next generation of the Windows installer and uninstaller system that doesn't suck and isn't huge.$\r$\n$\r$\nNSIS includes a Modern User Interface, LZMA compression, support for multiple languages and an easy plug-in system.$\r$\n$\r$\n$_CLICK"
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "..\COPYING"
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+Page custom PageReinstall PageLeaveReinstall
+!endif
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+
+!define MUI_FINISHPAGE_LINK "Visit the NSIS site for the latest news, FAQs and support"
+!define MUI_FINISHPAGE_LINK_LOCATION "http://nsis.sf.net/"
+
+!define MUI_FINISHPAGE_RUN "$INSTDIR\NSIS.exe"
+!define MUI_FINISHPAGE_NOREBOOTSUPPORT
+
+!define MUI_FINISHPAGE_SHOWREADME
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show release notes"
+!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReleaseNotes
+
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+;Languages
+
+!insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Version information
+
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+VIProductVersion ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD}
+VIAddVersionKey "FileVersion" "${VERSION}"
+VIAddVersionKey "FileDescription" "NSIS Setup"
+VIAddVersionKey "LegalCopyright" "http://nsis.sf.net/License"
+!endif
+
+;--------------------------------
+;Installer Sections
+
+!macro InstallPlugin pi
+ !if ${BITS} >= 64
+ File "/oname=$InstDir\Plugins\amd64-unicode\${pi}.dll" ..\Plugins\amd64-unicode\${pi}.dll
+ !else
+ File "/oname=$InstDir\Plugins\x86-ansi\${pi}.dll" ..\Plugins\x86-ansi\${pi}.dll
+ File "/oname=$InstDir\Plugins\x86-unicode\${pi}.dll" ..\Plugins\x86-unicode\${pi}.dll
+ !endif
+!macroend
+
+!macro InstallStub stub
+ !if ${BITS} >= 64
+ File ..\Stubs\${stub}-amd64-unicode
+ !else
+ File ..\Stubs\${stub}-x86-ansi
+ File ..\Stubs\${stub}-x86-unicode
+ !endif
+!macroend
+
+${MementoSection} "NSIS Core Files (required)" SecCore
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing NSIS Core Files..."
+ SetDetailsPrint listonly
+
+ SectionIn 1 2 3 RO
+ SetOutPath $INSTDIR
+ RMDir /r $SMPROGRAMS\NSIS
+
+ IfFileExists $INSTDIR\nsisconf.nsi "" +2
+ Rename $INSTDIR\nsisconf.nsi $INSTDIR\nsisconf.nsh
+ SetOverwrite off
+ File ..\nsisconf.nsh
+
+ SetOverwrite on
+ File ..\makensis.exe
+ File ..\makensisw.exe
+ File ..\COPYING
+ File ..\NSIS.chm
+ !pragma verifychm "..\NSIS.chm"
+ !if /FileExists "..\NSIS.exe"
+ !if /FileExists "..\NSIS.exe.manifest"
+ File "..\NSIS.exe.manifest"
+ !endif
+ !else
+ !define NO_NSISMENU_HTML 1
+ !makensis '-v2 "NSISMenu.nsi" "-XOutFile ..\NSIS.exe"' = 0
+ !endif
+ File ..\NSIS.exe
+
+ SetOutPath $INSTDIR\Bin
+ File ..\Bin\makensis.exe
+!ifdef USE_NEW_ZLIB
+ File ..\Bin\zlib.dll
+!else
+ File ..\Bin\zlib1.dll
+!endif
+
+ SetOutPath $INSTDIR\Stubs
+ File ..\Stubs\uninst
+ !insertmacro InstallStub bzip2
+ !insertmacro InstallStub bzip2_solid
+ !insertmacro InstallStub lzma
+ !insertmacro InstallStub lzma_solid
+ !insertmacro InstallStub zlib
+ !insertmacro InstallStub zlib_solid
+
+
+ SetOutPath $INSTDIR\Include
+ File ..\Include\WinMessages.nsh
+ File ..\Include\Sections.nsh
+ File ..\Include\Library.nsh
+ File ..\Include\UpgradeDLL.nsh
+ File ..\Include\LogicLib.nsh
+ File ..\Include\StrFunc.nsh
+ File ..\Include\Colors.nsh
+ File ..\Include\FileFunc.nsh
+ File ..\Include\TextFunc.nsh
+ File ..\Include\WordFunc.nsh
+ File ..\Include\WinVer.nsh
+ File ..\Include\x64.nsh
+ File ..\Include\Memento.nsh
+ File ..\Include\LangFile.nsh
+ File ..\Include\InstallOptions.nsh
+ File ..\Include\MultiUser.nsh
+ File ..\Include\VB6RunTime.nsh
+ File ..\Include\Util.nsh
+ File ..\Include\WinCore.nsh
+
+ SetOutPath $INSTDIR\Include\Win
+ File ..\Include\Win\WinDef.nsh
+ File ..\Include\Win\WinError.nsh
+ File ..\Include\Win\WinNT.nsh
+ File ..\Include\Win\WinUser.nsh
+ File ..\Include\Win\COM.nsh
+ File ..\Include\Win\Propkey.nsh
+
+ SetOutPath $INSTDIR\Docs\StrFunc
+ File ..\Docs\StrFunc\StrFunc.txt
+
+ SetOutPath $INSTDIR\Docs\MultiUser
+ File ..\Docs\MultiUser\Readme.html
+
+ SetOutPath $INSTDIR\Docs\makensisw
+ File ..\Docs\makensisw\*.txt
+
+ !ifndef NO_NSISMENU_HTML
+ SetOutPath $INSTDIR\Menu
+ File ..\Menu\*.html
+ SetOutPath $INSTDIR\Menu\images
+ File ..\Menu\images\header.gif
+ File ..\Menu\images\line.gif
+ File ..\Menu\images\site.gif
+ !endif
+
+ Delete $INSTDIR\makensis.htm
+ Delete $INSTDIR\Docs\*.html
+ Delete $INSTDIR\Docs\style.css
+ RMDir $INSTDIR\Docs
+
+ SetOutPath $INSTDIR\Bin
+ !if ${BITS} >= 64
+ File /NonFatal ..\Bin\RegTool-x86.bin
+ File ..\Bin\RegTool-amd64.bin
+ !else
+ File ..\Bin\RegTool-x86.bin
+ !if /FileExists ..\Bin\RegTool-amd64.bin ; It is unlikely that this exists, avoid the /NonFatal warning.
+ File ..\Bin\RegTool-amd64.bin
+ !endif
+ !endif
+
+ CreateDirectory $INSTDIR\Plugins\x86-ansi
+ CreateDirectory $INSTDIR\Plugins\x86-unicode
+ !if ${BITS} >= 64
+ CreateDirectory $INSTDIR\Plugins\amd64-unicode
+ !endif
+ !insertmacro InstallPlugin TypeLib
+
+ ReadRegStr $R0 HKCR ".nsi" ""
+ StrCmp $R0 "NSISFile" 0 +2
+ DeleteRegKey HKCR "NSISFile"
+
+ WriteRegStr HKCR ".nsi" "" "NSIS.Script"
+ WriteRegStr HKCR ".nsi" "PerceivedType" "text"
+ WriteRegStr HKCR "NSIS.Script" "" "NSIS Script File"
+ WriteRegStr HKCR "NSIS.Script\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
+ ReadRegStr $R0 HKCR "NSIS.Script\shell\open\command" ""
+ ${If} $R0 == ""
+ WriteRegStr HKCR "NSIS.Script\shell" "" "open"
+ WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
+ ${EndIf}
+ WriteRegStr HKCR "NSIS.Script\shell\compile" "" "Compile NSIS Script"
+ WriteRegStr HKCR "NSIS.Script\shell\compile\command" "" '"$INSTDIR\makensisw.exe" "%1"'
+ WriteRegStr HKCR "NSIS.Script\shell\compile-compressor" "" "Compile NSIS Script (Choose Compressor)"
+ WriteRegStr HKCR "NSIS.Script\shell\compile-compressor\command" "" '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
+
+ ReadRegStr $R0 HKCR ".nsh" ""
+ StrCmp $R0 "NSHFile" 0 +2
+ DeleteRegKey HKCR "NSHFile"
+
+ WriteRegStr HKCR ".nsh" "" "NSIS.Header"
+ WriteRegStr HKCR ".nsh" "PerceivedType" "text"
+ WriteRegStr HKCR "NSIS.Header" "" "NSIS Header File"
+ WriteRegStr HKCR "NSIS.Header\DefaultIcon" "" "$INSTDIR\makensisw.exe,2"
+ ReadRegStr $R0 HKCR "NSIS.Header\shell\open\command" ""
+ ${If} $R0 == ""
+ WriteRegStr HKCR "NSIS.Header\shell" "" "open"
+ WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
+ ${EndIf}
+
+ System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p0, p0)'
+
+${MementoSectionEnd}
+
+${MementoSection} "Script Examples" SecExample
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Script Examples..."
+ SetDetailsPrint listonly
+
+ SectionIn 1 2
+ SetOutPath $INSTDIR\Examples
+ File ..\Examples\makensis.nsi
+ File ..\Examples\example1.nsi
+ File ..\Examples\example2.nsi
+ File ..\Examples\viewhtml.nsi
+ File ..\Examples\waplugin.nsi
+ File ..\Examples\bigtest.nsi
+ File ..\Examples\primes.nsi
+ File ..\Examples\rtest.nsi
+ File ..\Examples\gfx.nsi
+ File ..\Examples\one-section.nsi
+ File ..\Examples\languages.nsi
+ File ..\Examples\Library.nsi
+ File ..\Examples\VersionInfo.nsi
+ File ..\Examples\UserVars.nsi
+ File ..\Examples\LogicLib.nsi
+ File ..\Examples\silent.nsi
+ File ..\Examples\StrFunc.nsi
+ File ..\Examples\FileFunc.nsi
+ File ..\Examples\FileFunc.ini
+ File ..\Examples\FileFuncTest.nsi
+ File ..\Examples\TextFunc.nsi
+ File ..\Examples\TextFunc.ini
+ File ..\Examples\TextFuncTest.nsi
+ File ..\Examples\WordFunc.nsi
+ File ..\Examples\WordFunc.ini
+ File ..\Examples\WordFuncTest.nsi
+ File ..\Examples\Memento.nsi
+ File ..\Examples\unicode.nsi
+ File ..\Examples\NSISMenu.nsi
+
+ SetOutPath $INSTDIR\Examples\Plugin
+ File ..\Examples\Plugin\exdll.c
+ File ..\Examples\Plugin\exdll.dpr
+ File ..\Examples\Plugin\exdll.dsp
+ File ..\Examples\Plugin\exdll.dsw
+ File ..\Examples\Plugin\exdll_with_unit.dpr
+ File ..\Examples\Plugin\exdll-vs2008.sln
+ File ..\Examples\Plugin\exdll-vs2008.vcproj
+ File ..\Examples\Plugin\extdll.inc
+ File ..\Examples\Plugin\nsis.pas
+
+ SetOutPath $INSTDIR\Examples\Plugin\nsis
+ File ..\Examples\Plugin\nsis\pluginapi.h
+ File /nonfatal ..\Examples\Plugin\nsis\pluginapi*.lib
+ File ..\Examples\Plugin\nsis\api.h
+ File ..\Examples\Plugin\nsis\nsis_tchar.h
+
+${MementoSectionEnd}
+
+!ifndef NO_STARTMENUSHORTCUTS
+${MementoSection} "Start Menu and Desktop Shortcuts" SecShortcuts
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Start Menu and Desktop Shortcuts..."
+ SetDetailsPrint listonly
+
+!else
+${MementoSection} "Desktop Shortcut" SecShortcuts
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Desktop Shortcut..."
+ SetDetailsPrint listonly
+
+!endif
+ SectionIn 1 2
+ SetOutPath $INSTDIR
+!ifndef NO_STARTMENUSHORTCUTS
+ CreateShortcut "$SMPROGRAMS\NSIS${NAMESUFFIX}.lnk" "$INSTDIR\NSIS.exe"
+!endif
+
+ CreateShortcut "$DESKTOP\NSIS${NAMESUFFIX}.lnk" "$INSTDIR\NSIS.exe"
+
+${MementoSectionEnd}
+
+SectionGroup "User Interfaces" SecInterfaces
+
+${MementoSection} "Modern User Interface" SecInterfacesModernUI
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing User Interfaces | Modern User Interface..."
+ SetDetailsPrint listonly
+
+ SectionIn 1 2
+
+ SetOutPath "$INSTDIR\Examples\Modern UI"
+ File "..\Examples\Modern UI\Basic.nsi"
+ File "..\Examples\Modern UI\HeaderBitmap.nsi"
+ File "..\Examples\Modern UI\MultiLanguage.nsi"
+ File "..\Examples\Modern UI\StartMenu.nsi"
+ File "..\Examples\Modern UI\WelcomeFinish.nsi"
+
+ SetOutPath "$INSTDIR\Contrib\Modern UI"
+ File "..\Contrib\Modern UI\System.nsh"
+ File "..\Contrib\Modern UI\ioSpecial.ini"
+
+ SetOutPath "$INSTDIR\Docs\Modern UI"
+ File "..\Docs\Modern UI\Readme.html"
+ File "..\Docs\Modern UI\Changelog.txt"
+ File "..\Docs\Modern UI\License.txt"
+
+ SetOutPath "$INSTDIR\Docs\Modern UI\images"
+ File "..\Docs\Modern UI\images\header.gif"
+ File "..\Docs\Modern UI\images\screen1.png"
+ File "..\Docs\Modern UI\images\screen2.png"
+ File "..\Docs\Modern UI\images\open.gif"
+ File "..\Docs\Modern UI\images\closed.gif"
+
+ SetOutPath $INSTDIR\Contrib\UIs
+ File "..\Contrib\UIs\modern.exe"
+ File "..\Contrib\UIs\modern_headerbmp.exe"
+ File "..\Contrib\UIs\modern_headerbmpr.exe"
+ File "..\Contrib\UIs\modern_nodesc.exe"
+ File "..\Contrib\UIs\modern_smalldesc.exe"
+
+ SetOutPath $INSTDIR\Include
+ File "..\Include\MUI.nsh"
+
+ SetOutPath "$INSTDIR\Contrib\Modern UI 2"
+ File "..\Contrib\Modern UI 2\Deprecated.nsh"
+ File "..\Contrib\Modern UI 2\Interface.nsh"
+ File "..\Contrib\Modern UI 2\Localization.nsh"
+ File "..\Contrib\Modern UI 2\MUI2.nsh"
+ File "..\Contrib\Modern UI 2\Pages.nsh"
+
+ SetOutPath "$INSTDIR\Contrib\Modern UI 2\Pages"
+ File "..\Contrib\Modern UI 2\Pages\Components.nsh"
+ File "..\Contrib\Modern UI 2\Pages\Directory.nsh"
+ File "..\Contrib\Modern UI 2\Pages\Finish.nsh"
+ File "..\Contrib\Modern UI 2\Pages\InstallFiles.nsh"
+ File "..\Contrib\Modern UI 2\Pages\License.nsh"
+ File "..\Contrib\Modern UI 2\Pages\StartMenu.nsh"
+ File "..\Contrib\Modern UI 2\Pages\UninstallConfirm.nsh"
+ File "..\Contrib\Modern UI 2\Pages\Welcome.nsh"
+
+ SetOutPath "$INSTDIR\Docs\Modern UI 2"
+ File "..\Docs\Modern UI 2\Readme.html"
+ File "..\Docs\Modern UI 2\License.txt"
+
+ SetOutPath "$INSTDIR\Docs\Modern UI 2\images"
+ File "..\Docs\Modern UI 2\images\header.gif"
+ File "..\Docs\Modern UI 2\images\screen1.png"
+ File "..\Docs\Modern UI 2\images\screen2.png"
+ File "..\Docs\Modern UI 2\images\open.gif"
+ File "..\Docs\Modern UI 2\images\closed.gif"
+
+ SetOutPath $INSTDIR\Include
+ File "..\Include\MUI2.nsh"
+
+${MementoSectionEnd}
+
+${MementoSection} "Default User Interface" SecInterfacesDefaultUI
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing User Interfaces | Default User Interface..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ SetOutPath "$INSTDIR\Contrib\UIs"
+ File "..\Contrib\UIs\default.exe"
+
+${MementoSectionEnd}
+
+${MementoSection} "Tiny User Interface" SecInterfacesTinyUI
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing User Interfaces | Tiny User Interface..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ SetOutPath "$INSTDIR\Contrib\UIs"
+ File "..\Contrib\UIs\sdbarker_tiny.exe"
+
+${MementoSectionEnd}
+
+SectionGroupEnd
+
+${MementoSection} "Graphics" SecGraphics
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Graphics..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ Delete $INSTDIR\Contrib\Icons\*.ico
+ Delete $INSTDIR\Contrib\Icons\*.bmp
+ RMDir $INSTDIR\Contrib\Icons
+ SetOutPath $INSTDIR\Contrib\Graphics
+ File /r "..\Contrib\Graphics\*.ico"
+ File /r "..\Contrib\Graphics\*.bmp"
+${MementoSectionEnd}
+
+${MementoSection} "Language Files" SecLangFiles
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Language Files..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ SetOutPath "$INSTDIR\Contrib\Language files"
+ File "..\Contrib\Language files\*.nlf"
+
+ SetOutPath $INSTDIR\Bin
+ File ..\Bin\MakeLangID.exe
+
+ ${If} ${SectionIsSelected} ${SecInterfacesModernUI}
+ SetOutPath "$INSTDIR\Contrib\Language files"
+ File "..\Contrib\Language files\*.nsh"
+ ${EndIf}
+
+${MementoSectionEnd}
+
+SectionGroup "Tools" SecTools
+
+${MementoSection} "Zip2Exe" SecToolsZ2E
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Tools | Zip2Exe..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ SetOutPath $INSTDIR\Bin
+ File ..\Bin\zip2exe.exe
+ SetOutPath $INSTDIR\Contrib\zip2exe
+ File ..\Contrib\zip2exe\Base.nsh
+ File ..\Contrib\zip2exe\Modern.nsh
+ File ..\Contrib\zip2exe\Classic.nsh
+
+${MementoSectionEnd}
+
+SectionGroupEnd
+
+SectionGroup "Plug-ins" SecPluginsPlugins
+
+${MementoSection} "Banner" SecPluginsBanner
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | Banner..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin Banner
+ SetOutPath $INSTDIR\Docs\Banner
+ File ..\Docs\Banner\Readme.txt
+ SetOutPath $INSTDIR\Examples\Banner
+ File ..\Examples\Banner\Example.nsi
+${MementoSectionEnd}
+
+${MementoSection} "Language DLL" SecPluginsLangDLL
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | Language DLL..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+ !insertmacro InstallPlugin LangDLL
+${MementoSectionEnd}
+
+${MementoSection} "nsExec" SecPluginsnsExec
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | nsExec..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin nsExec
+ SetOutPath $INSTDIR\Docs\nsExec
+ File ..\Docs\nsExec\nsExec.txt
+ SetOutPath $INSTDIR\Examples\nsExec
+ File ..\Examples\nsExec\test.nsi
+${MementoSectionEnd}
+
+${MementoSection} "Splash" SecPluginsSplash
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | Splash..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin splash
+ SetOutPath $INSTDIR\Docs\Splash
+ File ..\Docs\Splash\splash.txt
+ SetOutPath $INSTDIR\Examples\Splash
+ File ..\Examples\Splash\Example.nsi
+${MementoSectionEnd}
+
+${MementoSection} "AdvSplash" SecPluginsSplashT
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | AdvSplash..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin advsplash
+ SetOutPath $INSTDIR\Docs\AdvSplash
+ File ..\Docs\AdvSplash\advsplash.txt
+ SetOutPath $INSTDIR\Examples\AdvSplash
+ File ..\Examples\AdvSplash\Example.nsi
+${MementoSectionEnd}
+
+${MementoSection} "BgImage" SecPluginsBgImage
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | BgImage..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin BgImage
+ SetOutPath $INSTDIR\Docs\BgImage
+ File ..\Docs\BgImage\BgImage.txt
+ SetOutPath $INSTDIR\Examples\BgImage
+ File ..\Examples\BgImage\Example.nsi
+${MementoSectionEnd}
+
+${MementoSection} "InstallOptions" SecPluginsIO
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | InstallOptions..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin InstallOptions
+ SetOutPath $INSTDIR\Docs\InstallOptions
+ File ..\Docs\InstallOptions\Readme.html
+ File ..\Docs\InstallOptions\Changelog.txt
+ SetOutPath $INSTDIR\Examples\InstallOptions
+ File ..\Examples\InstallOptions\test.ini
+ File ..\Examples\InstallOptions\test.nsi
+ File ..\Examples\InstallOptions\testimgs.ini
+ File ..\Examples\InstallOptions\testimgs.nsi
+ File ..\Examples\InstallOptions\testlink.ini
+ File ..\Examples\InstallOptions\testlink.nsi
+ File ..\Examples\InstallOptions\testnotify.ini
+ File ..\Examples\InstallOptions\testnotify.nsi
+${MementoSectionEnd}
+
+${MementoSection} "nsDialogs" SecPluginsDialogs
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | nsDialogs..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin nsDialogs
+ SetOutPath $INSTDIR\Examples\nsDialogs
+ File ..\Examples\nsDialogs\example.nsi
+ File ..\Examples\nsDialogs\InstallOptions.nsi
+ File ..\Examples\nsDialogs\timer.nsi
+ File ..\Examples\nsDialogs\welcome.nsi
+ SetOutPath $INSTDIR\Include
+ File ..\Include\nsDialogs.nsh
+ SetOutPath $INSTDIR\Docs\nsDialogs
+ File ..\Docs\nsDialogs\Readme.html
+${MementoSectionEnd}
+
+${MementoSection} "Math" SecPluginsMath
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | Math..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin Math
+ SetOutPath $INSTDIR\Docs\Math
+ File ..\Docs\Math\Math.txt
+ SetOutPath $INSTDIR\Examples\Math
+ File ..\Examples\Math\math.nsi
+ File ..\Examples\Math\mathtest.txt
+ File ..\Examples\Math\mathtest.nsi
+ File ..\Examples\Math\mathtest.ini
+
+${MementoSectionEnd}
+
+${MementoSection} "NSISdl" SecPluginsNSISDL
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | NSISdl..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin nsisdl
+ SetOutPath $INSTDIR\Docs\NSISdl
+ File ..\Docs\NSISdl\ReadMe.txt
+ File ..\Docs\NSISdl\License.txt
+${MementoSectionEnd}
+
+${MementoSection} "System" SecPluginsSystem
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | System..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin System
+ SetOutPath $INSTDIR\Docs\System
+ File ..\Docs\System\System.html
+ File ..\Docs\System\WhatsNew.txt
+ SetOutPath $INSTDIR\Examples\System
+ File ..\Examples\System\Resource.dll
+ File ..\Examples\System\SysFunc.nsh
+ File ..\Examples\System\System.nsh
+ File ..\Examples\System\System.nsi
+${MementoSectionEnd}
+
+${MementoSection} "StartMenu" SecPluginsStartMenu
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | StartMenu..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin StartMenu
+ SetOutPath $INSTDIR\Docs\StartMenu
+ File ..\Docs\StartMenu\Readme.txt
+ SetOutPath $INSTDIR\Examples\StartMenu
+ File ..\Examples\StartMenu\Example.nsi
+${MementoSectionEnd}
+
+${MementoSection} "UserInfo" SecPluginsUserInfo
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | UserInfo..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin UserInfo
+ SetOutPath $INSTDIR\Examples\UserInfo
+ File ..\Examples\UserInfo\UserInfo.nsi
+${MementoSectionEnd}
+
+${MementoSection} "Dialer" SecPluginsDialer
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | Dialer..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin Dialer
+ SetOutPath $INSTDIR\Docs\Dialer
+ File ..\Docs\Dialer\Dialer.txt
+${MementoSectionEnd}
+
+${MementoSection} "VPatch" SecPluginsVPatch
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | VPatch..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ !insertmacro InstallPlugin VPatch
+ SetOutPath $INSTDIR\Examples\VPatch
+ File ..\Examples\VPatch\example.nsi
+ File ..\Examples\VPatch\oldfile.txt
+ File ..\Examples\VPatch\newfile.txt
+ File ..\Examples\VPatch\patch.pat
+ SetOutPath $INSTDIR\Docs\VPatch
+ File ..\Docs\VPatch\Readme.html
+ SetOutPath $INSTDIR\Bin
+ File ..\Bin\GenPat.exe
+ SetOutPath $INSTDIR\Include
+ File ..\Include\VPatchLib.nsh
+${MementoSectionEnd}
+
+${MementoSectionDone}
+
+SectionGroupEnd
+
+Section -post
+
+ ; When Modern UI is installed:
+ ; * Always install the English language file
+ ; * Always install default icons / bitmaps
+
+ ${If} ${SectionIsSelected} ${SecInterfacesModernUI}
+
+ SetDetailsPrint textonly
+ DetailPrint "Configuring Modern UI..."
+ SetDetailsPrint listonly
+
+ ${IfNot} ${SectionIsSelected} ${SecLangFiles}
+ SetOutPath "$INSTDIR\Contrib\Language files"
+ File "..\Contrib\Language files\English.nlf"
+ File "..\Contrib\Language files\English.nsh"
+ ${EndIf}
+
+ ${IfNot} ${SectionIsSelected} ${SecGraphics}
+ SetOutPath $INSTDIR\Contrib\Graphics\Checks
+ File "..\Contrib\Graphics\Checks\modern.bmp"
+ SetOutPath $INSTDIR\Contrib\Graphics\Icons
+ File "..\Contrib\Graphics\Icons\modern-install.ico"
+ File "..\Contrib\Graphics\Icons\modern-uninstall.ico"
+ SetOutPath $INSTDIR\Contrib\Graphics\Header
+ File "..\Contrib\Graphics\Header\nsis.bmp"
+ SetOutPath $INSTDIR\Contrib\Graphics\Wizard
+ File "..\Contrib\Graphics\Wizard\win.bmp"
+ ${EndIf}
+
+ ${EndIf}
+
+ SetDetailsPrint textonly
+ DetailPrint "Creating Registry Keys..."
+ SetDetailsPrint listonly
+
+ SetOutPath $INSTDIR
+
+ WriteRegStr HKLM "Software\NSIS" "" $INSTDIR
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+ WriteRegDword HKLM "Software\NSIS" "VersionMajor" "${VER_MAJOR}"
+ WriteRegDword HKLM "Software\NSIS" "VersionMinor" "${VER_MINOR}"
+ WriteRegDword HKLM "Software\NSIS" "VersionRevision" "${VER_REVISION}"
+ WriteRegDword HKLM "Software\NSIS" "VersionBuild" "${VER_BUILD}"
+!endif
+
+ WriteRegExpandStr HKLM "${REG_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninst-nsis.exe"'
+ ;WriteRegStr HKLM "${REG_UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninst-nsis.exe" /S' ; Ideally WACK would use this
+ WriteRegExpandStr HKLM "${REG_UNINST_KEY}" "InstallLocation" "$INSTDIR"
+ WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayName" "Nullsoft Install System${NAMESUFFIX}"
+ WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayIcon" "$INSTDIR\uninst-nsis.exe,0"
+ WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayVersion" "${VERSION}"
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+ WriteRegDWORD HKLM "${REG_UNINST_KEY}" "VersionMajor" "${VER_MAJOR}" ; Required by WACK
+ WriteRegDWORD HKLM "${REG_UNINST_KEY}" "VersionMinor" "${VER_MINOR}" ; Required by WACK
+!endif
+ WriteRegStr HKLM "${REG_UNINST_KEY}" "Publisher" "Nullsoft and Contributors" ; Required by WACK
+ WriteRegStr HKLM "${REG_UNINST_KEY}" "URLInfoAbout" "http://nsis.sourceforge.net/"
+ WriteRegStr HKLM "${REG_UNINST_KEY}" "HelpLink" "http://nsis.sourceforge.net/Support"
+ WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoModify" "1"
+ WriteRegDWORD HKLM "${REG_UNINST_KEY}" "NoRepair" "1"
+ ${MakeARPInstallDate} $1
+ WriteRegStr HKLM "${REG_UNINST_KEY}" "InstallDate" $1
+
+ WriteUninstaller $INSTDIR\uninst-nsis.exe
+
+ ${MementoSectionSave}
+
+ SetDetailsPrint both
+
+SectionEnd
+
+;--------------------------------
+;Descriptions
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The core files required to use NSIS (compiler etc.)"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecExample} "Example installation scripts that show you how to use NSIS"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} "Adds icons to your start menu and your desktop for easy access"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfaces} "User interface designs that can be used to change the installer look and feel"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesModernUI} "A modern user interface like the wizards of recent Windows versions"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesDefaultUI} "The default NSIS user interface which you can customize to make your own UI"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesTinyUI} "A tiny version of the default user interface"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecTools} "Tools that help you with NSIS development"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsZ2E} "A utility that converts a ZIP file to a NSIS installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecGraphics} "Icons, checkbox images and other graphics"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecLangFiles} "Language files used to support multiple languages in an installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsPlugins} "Useful plugins that extend NSIS's functionality"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBanner} "Plugin that lets you show a banner before installation starts"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsLangDLL} "Plugin that lets you add a language select dialog to your installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsnsExec} "Plugin that executes console programs and prints its output in the NSIS log window or hides it"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplash} "Splash screen add-on that lets you add a splash screen to an installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplashT} "Splash screen add-on with transparency support that lets you add a splash screen to an installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSystem} "Plugin that lets you call Win32 API or external DLLs"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsMath} "Plugin that lets you evaluate complicated mathematical expressions"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialer} "Plugin that provides internet connection functions"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsIO} "Plugin that lets you add custom pages to an installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialogs} "Plugin that lets you add custom pages to an installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsStartMenu} "Plugin that lets the user select the start menu folder"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBgImage} "Plugin that lets you show a persistent background image plugin and play sounds"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsUserInfo} "Plugin that that gives you the user name and the user account type"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsNSISDL} "Plugin that lets you create a web based installer"
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsVPatch} "Plugin that lets you create patches to upgrade older files"
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+;--------------------------------
+;Installer Functions
+
+Function .onInit
+
+ ${MementoSectionRestore}
+
+FunctionEnd
+
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+
+Var ReinstallPageCheck
+
+Function PageReinstall
+
+ ReadRegStr $R0 HKLM "Software\NSIS" ""
+ ReadRegStr $R1 HKLM "${REG_UNINST_KEY}" "UninstallString"
+ ${IfThen} "$R0$R1" == "" ${|} Abort ${|}
+
+ StrCpy $R4 "older"
+ ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionMajor"
+ ReadRegDWORD $R1 HKLM "Software\NSIS" "VersionMinor"
+ ReadRegDWORD $R2 HKLM "Software\NSIS" "VersionRevision"
+ ReadRegDWORD $R3 HKLM "Software\NSIS" "VersionBuild"
+ ${IfThen} $R0 = 0 ${|} StrCpy $R4 "unknown" ${|} ; Anonymous builds have no version number
+ StrCpy $R0 $R0.$R1.$R2.$R3
+
+ ${VersionCompare} ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD} $R0 $R0
+ ${If} $R0 == 0
+ StrCpy $R1 "NSIS ${VERSION} is already installed. Select the operation you want to perform and click Next to continue."
+ StrCpy $R2 "Add/Reinstall components"
+ StrCpy $R3 "Uninstall NSIS"
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
+ StrCpy $R0 "2"
+ ${ElseIf} $R0 == 1
+ StrCpy $R1 "An $R4 version of NSIS is installed on your system. It's recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
+ StrCpy $R2 "Uninstall before installing"
+ StrCpy $R3 "Do not uninstall"
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
+ StrCpy $R0 "1"
+ ${ElseIf} $R0 == 2
+ StrCpy $R1 "A newer version of NSIS is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
+ StrCpy $R2 "Uninstall before installing"
+ StrCpy $R3 "Do not uninstall"
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
+ StrCpy $R0 "1"
+ ${Else}
+ Abort
+ ${EndIf}
+
+ nsDialogs::Create 1018
+ Pop $R4
+
+ ${NSD_CreateLabel} 0 0 100% 24u $R1
+ Pop $R1
+
+ ${NSD_CreateRadioButton} 30u 50u -30u 8u $R2
+ Pop $R2
+ ${NSD_OnClick} $R2 PageReinstallUpdateSelection
+
+ ${NSD_CreateRadioButton} 30u 70u -30u 8u $R3
+ Pop $R3
+ ${NSD_OnClick} $R3 PageReinstallUpdateSelection
+
+ ${If} $ReinstallPageCheck != 2
+ SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0
+ ${Else}
+ SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0
+ ${EndIf}
+
+ ${NSD_SetFocus} $R2
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Function PageReinstallUpdateSelection
+
+ Pop $R1
+
+ ${NSD_GetState} $R2 $R1
+
+ ${If} $R1 == ${BST_CHECKED}
+ StrCpy $ReinstallPageCheck 1
+ ${Else}
+ StrCpy $ReinstallPageCheck 2
+ ${EndIf}
+
+FunctionEnd
+
+Function PageLeaveReinstall
+
+ ${NSD_GetState} $R2 $R1
+
+ StrCmp $R0 "1" 0 +2 ; Existing install is not the same version?
+ StrCmp $R1 "1" reinst_uninstall reinst_done
+
+ StrCmp $R1 "1" reinst_done ; Same version, skip to add/reinstall components?
+
+ reinst_uninstall:
+ ReadRegStr $R1 HKLM "${REG_UNINST_KEY}" "UninstallString"
+
+ ;Run uninstaller
+ HideWindow
+
+ ClearErrors
+ ExecWait '$R1 _?=$INSTDIR' $0
+
+ BringToFront
+
+ ${IfThen} ${Errors} ${|} StrCpy $0 2 ${|} ; ExecWait failed, set fake exit code
+
+ ${If} $0 <> 0
+ ${OrIf} ${FileExists} "$INSTDIR\Bin\makensis.exe"
+ ${If} $0 = 1 ; User aborted uninstaller?
+ StrCmp $R0 "2" 0 +2 ; Is the existing install the same version?
+ Quit ; ...yes, already installed, we are done
+ Abort
+ ${EndIf}
+ MessageBox MB_ICONEXCLAMATION "Unable to uninstall!"
+ Abort
+ ${Else}
+ StrCpy $0 $R1 1
+ ${IfThen} $0 == '"' ${|} StrCpy $R1 $R1 -1 1 ${|} ; Strip quotes from UninstallString
+ Delete $R1
+ RMDir $INSTDIR
+ ${EndIf}
+
+ reinst_done:
+
+FunctionEnd
+
+!endif # VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+
+Function ShowReleaseNotes
+ StrCpy $0 $WINDIR\hh.exe
+ ${IfNotThen} ${FileExists} $0 ${|} SearchPath $0 hh.exe ${|}
+ ${If} ${FileExists} $0
+ Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
+ ${Else}
+ ExecShell "" "http://nsis.sourceforge.net/Docs/AppendixF.html#F.1"
+ ${EndIf}
+FunctionEnd
+
+;--------------------------------
+;Uninstaller Section
+
+Section Uninstall
+
+ SetDetailsPrint textonly
+ DetailPrint "Uninstalling NSI Development Shell Extensions..."
+ SetDetailsPrint listonly
+
+ IfFileExists $INSTDIR\Bin\makensis.exe nsis_installed
+ MessageBox MB_YESNO "It does not appear that NSIS is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES nsis_installed
+ Abort "Uninstall aborted by user"
+ nsis_installed:
+
+ SetDetailsPrint textonly
+ DetailPrint "Deleting Registry Keys..."
+ SetDetailsPrint listonly
+
+ !macro AssocDeleteFileExtAndProgId _hkey _dotext _pid
+ ReadRegStr $R0 ${_hkey} "Software\Classes\${_dotext}" ""
+ StrCmp $R0 "${_pid}" 0 +2
+ DeleteRegKey ${_hkey} "Software\Classes\${_dotext}"
+
+ DeleteRegKey ${_hkey} "Software\Classes\${_pid}"
+ !macroend
+
+ !insertmacro AssocDeleteFileExtAndProgId HKLM ".nsi" "NSIS.Script"
+ !insertmacro AssocDeleteFileExtAndProgId HKLM ".nsh" "NSIS.Header"
+
+ System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p0, p0)'
+
+ DeleteRegKey HKLM "${REG_UNINST_KEY}"
+ DeleteRegKey HKLM "Software\NSIS"
+
+ SetDetailsPrint textonly
+ DetailPrint "Deleting Files..."
+ SetDetailsPrint listonly
+
+ Delete "$SMPROGRAMS\NSIS${NAMESUFFIX}.lnk"
+ Delete "$DESKTOP\NSIS${NAMESUFFIX}.lnk"
+ Delete $INSTDIR\makensis.exe
+ Delete $INSTDIR\makensisw.exe
+ Delete $INSTDIR\NSIS.exe
+ Delete $INSTDIR\NSIS.exe.manifest
+ Delete $INSTDIR\license.txt
+ Delete $INSTDIR\COPYING
+ Delete $INSTDIR\uninst-nsis.exe
+ Delete $INSTDIR\nsisconf.nsi
+ Delete $INSTDIR\nsisconf.nsh
+ Delete $INSTDIR\NSIS.chm
+ RMDir /r $INSTDIR\Bin
+ RMDir /r $INSTDIR\Contrib
+ RMDir /r $INSTDIR\Docs
+ RMDir /r $INSTDIR\Examples
+ RMDir /r $INSTDIR\Include
+ RMDir /r $INSTDIR\Menu
+ RMDir /r $INSTDIR\Plugins
+ RMDir /r $INSTDIR\Stubs
+ RMDir $INSTDIR
+
+ SetDetailsPrint both
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/nsDialogs/InstallOptions.nsi b/KattekerCreator/nsis/Examples/nsDialogs/InstallOptions.nsi
new file mode 100644
index 0000000..68a68f9
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/nsDialogs/InstallOptions.nsi
@@ -0,0 +1,47 @@
+!include LogicLib.nsh
+!include WinMessages.nsh
+
+Name "nsDialogs IO"
+OutFile "nsDialogs IO.exe"
+
+Page custom nsDialogsIO UpdateINIState
+Page instfiles
+
+XPStyle on
+
+ShowInstDetails show
+
+!include nsDialogs.nsh
+!insertmacro NSD_FUNCTION_INIFILE
+
+Function nsDialogsIO
+
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\io.ini "..\InstallOptions\test.ini"
+
+ ${If} ${Cmd} `MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Test the right-to-left version?" IDYES`
+ WriteINIStr $PLUGINSDIR\io.ini Settings RTL 1
+ ${EndIf}
+
+ StrCpy $0 $PLUGINSDIR\io.ini
+
+ Call CreateDialogFromINI
+
+FunctionEnd
+
+Section
+
+ ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 2" "State"
+ DetailPrint "Install X=$0"
+ ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 3" "State"
+ DetailPrint "Install Y=$0"
+ ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 4" "State"
+ DetailPrint "Install Z=$0"
+ ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 5" "State"
+ DetailPrint "File=$0"
+ ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 6" "State"
+ DetailPrint "Dir=$0"
+ ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 8" "State"
+ DetailPrint "Info=$0"
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/nsDialogs/example.nsi b/KattekerCreator/nsis/Examples/nsDialogs/example.nsi
new file mode 100644
index 0000000..55bca4f
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/nsDialogs/example.nsi
@@ -0,0 +1,220 @@
+!include nsDialogs.nsh
+!include LogicLib.nsh
+!include WinCore.nsh ; MAKELONG
+
+Name "nsDialogs Example"
+OutFile "nsDialogs Example.exe"
+Caption "$(^Name)"
+
+XPStyle on
+RequestExecutionLevel user
+
+LicenseText "All the action takes place on the next page..." "Start"
+SubCaption 0 ": Ready?"
+
+Page license
+Page custom nsDialogsPage
+Page custom LBPage
+Page custom RangesPage
+Page custom NotifyPage
+!pragma warning disable 8000 ; "Page instfiles not used, no sections will be executed!"
+
+Var BUTTON
+Var EDIT
+Var CHECKBOX
+
+Function nsDialogsPage
+ nsDialogs::Create 1018
+ Pop $0
+
+ GetFunctionAddress $0 OnBack
+ nsDialogs::OnBack $0
+
+ ${NSD_CreateButton} 0 0 100% 12u Test
+ Pop $BUTTON
+ GetFunctionAddress $0 OnClick
+ nsDialogs::OnClick $BUTTON $0
+
+ ${NSD_CreateText} 0 35 100% 12u hello
+ Pop $EDIT
+ GetFunctionAddress $0 OnChange
+ nsDialogs::OnChange $EDIT $0
+ ${NSD_Edit_SetCueBannerText} $EDIT 0 "Type 'hello there' and get a free surprise"
+
+ ${NSD_CreateCheckbox} 0 -50 100% 8u Test
+ Pop $CHECKBOX
+ GetFunctionAddress $0 OnCheckbox
+ nsDialogs::OnClick $CHECKBOX $0
+
+ ${NSD_CreateLabel} 0 40u 75% 40u "* Type `hello there` above.$\n* Click the button.$\n* Check the checkbox.$\n* Hit the Back button."
+ Pop $0
+
+ nsDialogs::Show
+FunctionEnd
+
+Function OnClick
+ Pop $0 # HWND
+ MessageBox MB_OK clicky
+FunctionEnd
+
+Function OnChange
+ Pop $0 # HWND
+
+ System::Call user32::GetWindowText(p$EDIT,t.r0,i${NSIS_MAX_STRLEN})
+ ${If} $0 == "hello there"
+ MessageBox MB_OK "right back at ya"
+ ${EndIf}
+FunctionEnd
+
+Function OnBack
+ MessageBox MB_YESNO "are you sure?" IDYES +2
+ Abort
+FunctionEnd
+
+Function OnCheckbox
+ Pop $0 # HWND
+ MessageBox MB_OK "checkbox clicked"
+FunctionEnd
+
+!macro BeginControlsTestPage title
+ nsDialogs::Create 1018
+ Pop $0
+ ${NSD_SetText} $hWndParent "$(^Name): ${title}"
+!macroend
+
+!macro CreateButton x y w h txt var handler data
+ ${NSD_CreateButton} ${x} ${y} ${w} ${h} "${txt}"
+ Pop ${var}
+ nsDialogs::SetUserData ${var} ${data}
+ ${NSD_OnClick} ${var} ${handler}
+!macroend
+
+
+Function LBPage
+ !insertmacro BeginControlsTestPage "ListBox"
+
+ ${NSD_CreateSortedListBox} 1u 0 -2u 70u ""
+ Pop $1
+ ${NSD_LB_AddString} $1 "Foo"
+ ${NSD_LB_AddString} $1 "Bar"
+
+ StrCpy $9 1
+ ${NSD_CreateText} 1u 75u -2u 12u "New item #$9"
+ Pop $EDIT
+ !insertmacro CreateButton 1u 90u 50u 12u "Add (&Sorted)" $0 LBAction Add
+ !insertmacro CreateButton 53u 90u 50u 12u "&Prepend" $0 LBAction Prepend
+ !insertmacro CreateButton 105u 90u 50u 12u "&Append" $0 LBAction Append
+ !insertmacro CreateButton 160u 90u 50u 12u "&Delete Last" $0 LBAction DL
+ !insertmacro CreateButton 215u 90u 50u 12u "&Clear" $0 LBAction Clear
+
+ nsDialogs::Show
+FunctionEnd
+
+Function LBAction
+ Pop $0
+ nsDialogs::GetUserData $0
+ Pop $0
+ ${NSD_GetText} $EDIT $8
+
+ ${Select} $0
+ ${Case} "Add"
+ ${NSD_LB_AddString} $1 $8
+ ${Case} "Prepend"
+ ${NSD_LB_PrependString} $1 $8
+ ${Case} "Append"
+ ${NSD_LB_AppendString} $1 $8
+ ${Case} "DL"
+ ${NSD_LB_GetCount} $1 $8
+ ${If} $8 U> 0
+ IntOp $8 $8 - 1
+ ${NSD_LB_DelItem} $1 $8
+ ${EndIf}
+ Return
+ ${Case} "Clear"
+ ${NSD_LB_Clear} $1
+ Return
+ ${EndSelect}
+
+ IntOp $9 $9 + 1
+ ${NSD_SetText} $EDIT "New item #$9"
+FunctionEnd
+
+
+Function RangesPage
+ !insertmacro BeginControlsTestPage "Ranges"
+
+ ${NSD_CreateHTrackBar} 1 0 -2 20u ""
+ Pop $1
+ ${NSD_TrackBar_SetRangeMax} $1 10
+ ${NSD_TrackBar_SetTicFreq} $1 1
+ ${NSD_TrackBar_SetPos} $1 3
+
+ StrCpy $9 20 ; Progress pos
+ ${NSD_CreateProgressBar} 1 25u -2 8u ""
+ Pop $2
+ ${NSD_CreateTimer} RangesTimer 1000
+
+ ${NSD_CreateNumber} 1 40u 50u 12u "42"
+ Pop $3
+ ${NSD_CreateUpDown} 0 0 0 0 ""
+ Pop $4
+ ${NSD_UD_SetBuddy} $4 $3
+ ${MAKELONG} $5 $0 50 0 ; 0..50
+ ${NSD_UD_SetPackedRange} $4 $5
+
+ nsDialogs::Show
+FunctionEnd
+
+Function RangesTimer
+ IntOp $9 $9 + 5
+ ${IfThen} $9 > 100 ${|} StrCpy $9 0 ${|}
+ ${NSD_ProgressBar_SetPos} $2 $9
+FunctionEnd
+
+
+Function NotifyPage
+ !insertmacro BeginControlsTestPage "WM_NOTIFY"
+
+ ${NSD_CreateRichEdit} 1 1 -2 -2 ""
+ Pop $9
+ ${NSD_OnNotify} $9 OnNotify
+ IntOp $8 ${ENM_LINK} | ${ENM_KEYEVENTS}
+ ${NSD_RichEd_SetEventMask} $9 $8
+ SendMessage $9 ${EM_AUTOURLDETECT} 1 0
+ ${NSD_SetText} $9 "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard http://nsis.sf.net\par {\b Click the link!}\par\par Type something and I will block every other character...}"
+
+ nsDialogs::Show
+FunctionEnd
+
+Function OnNotify
+ Pop $1 ; HWND
+ Pop $2 ; Code
+ Pop $3 ; NMHDR*
+ ${If} $2 = ${EN_LINK}
+ System::Call '*$3(p,p,p,p.r2,p,p,i.r4,i.r5)' ; Extract from ENLINK*
+ ${IfThen} $2 <> ${WM_LBUTTONDOWN} ${|} Return ${|}
+ IntOp $2 $5 - $4
+ System::Call '*(ir4,ir5,l,&t$2,i)p.r2' ; Create TEXTRANGE and a text buffer
+ ${If} $2 P<> 0
+ IntPtrOp $3 $2 + 16 ; Find buffer
+ System::Call '*$2(i,i,p$3)' ; Set buffer in TEXTRANGE
+ SendMessage $1 ${EM_GETTEXTRANGE} "" $2 $4
+ ${If} $4 <> 0
+ System::Call 'SHELL32::ShellExecute(p$hWndParent, p0, pr3, p0, p0, i 1)'
+ ${EndIf}
+ System::Free $2
+ ${EndIf}
+ ${ElseIf} $2 = ${EN_MSGFILTER}
+ Var /Global Toggle
+ System::Call '*$3(p,i,i,i.r4)' ; MSGFILTER->msg
+ ${If} $4 = ${WM_CHAR}
+ IntOp $Toggle $Toggle ^ 1
+ ${If} $Toggle & 1
+ ${NSD_Return} 1
+ ${EndIf}
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+Section
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/nsDialogs/timer.nsi b/KattekerCreator/nsis/Examples/nsDialogs/timer.nsi
new file mode 100644
index 0000000..c24ef2c
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/nsDialogs/timer.nsi
@@ -0,0 +1,107 @@
+!include LogicLib.nsh
+!include nsDialogs.nsh
+!include WinMessages.nsh
+
+Name "nsDialogs Timer Example"
+OutFile "nsDialogs Timer Example.exe"
+XPStyle on
+RequestExecutionLevel user
+
+Var DIALOG
+Var TEXT
+Var PROGBAR
+Var PROGBAR2
+Var PROGBAR3
+Var BUTTON
+Var BUTTON2
+
+Page custom nsDialogsPage
+!pragma warning disable 8000 ; "Page instfiles not used, no sections will be executed!"
+
+Function OnTimer
+
+ SendMessage $PROGBAR ${PBM_GETPOS} 0 0 $1
+ ${If} $1 = 100
+ SendMessage $PROGBAR ${PBM_SETPOS} 0 0
+ ${Else}
+ SendMessage $PROGBAR ${PBM_DELTAPOS} 10 0
+ ${EndIf}
+
+FunctionEnd
+
+Function OnTimer2
+
+ SendMessage $PROGBAR2 ${PBM_GETPOS} 0 0 $1
+ ${If} $1 = 100
+ SendMessage $PROGBAR2 ${PBM_SETPOS} 0 0
+ ${Else}
+ SendMessage $PROGBAR2 ${PBM_DELTAPOS} 5 0
+ ${EndIf}
+
+FunctionEnd
+
+Function OnTimer3
+
+ SendMessage $PROGBAR3 ${PBM_GETPOS} 0 0 $1
+ ${If} $1 >= 100
+ ${NSD_KillTimer} OnTimer3
+ MessageBox MB_OK "Timer 3 killed"
+ ${Else}
+ SendMessage $PROGBAR3 ${PBM_DELTAPOS} 2 0
+ ${EndIf}
+
+FunctionEnd
+
+Function OnClick
+
+ Pop $0
+
+ ${NSD_KillTimer} OnTimer
+
+FunctionEnd
+
+Function OnClick2
+
+ Pop $0
+
+ ${NSD_KillTimer} OnTimer2
+
+FunctionEnd
+
+Function nsDialogsPage
+
+ nsDialogs::Create 1018
+ Pop $DIALOG
+
+ ${NSD_CreateLabel} 0u 0u 100% 9u "nsDialogs timer example"
+ Pop $TEXT
+
+ ${NSD_CreateProgressBar} 0u 10u 100% 12u ""
+ Pop $PROGBAR
+
+ ${NSD_CreateButton} 0u 25u 100u 14u "Kill Timer 1"
+ Pop $BUTTON
+ ${NSD_OnClick} $BUTTON OnClick
+
+ ${NSD_CreateProgressBar} 0u 52u 100% 12u ""
+ Pop $PROGBAR2
+ SendMessage $PROGBAR2 ${PBM_SETBARCOLOR} 0 0x0000FF ; No visual styles
+ SendMessage $PROGBAR2 ${PBM_SETSTATE} ${PBST_ERROR} 0 ; Vista+
+
+ ${NSD_CreateButton} 0u 67u 100u 14u "Kill Timer 2"
+ Pop $BUTTON2
+ ${NSD_OnClick} $BUTTON2 OnClick2
+
+ ${NSD_CreateProgressBar} 0u 114u 100% 12u ""
+ Pop $PROGBAR3
+
+ ${NSD_CreateTimer} OnTimer 1000
+ ${NSD_CreateTimer} OnTimer2 100
+ ${NSD_CreateTimer} OnTimer3 200
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Section
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/nsDialogs/welcome.nsi b/KattekerCreator/nsis/Examples/nsDialogs/welcome.nsi
new file mode 100644
index 0000000..d8c2cd7
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/nsDialogs/welcome.nsi
@@ -0,0 +1,214 @@
+!include MUI.nsh
+!include LogicLib.nsh
+!include nsDialogs.nsh
+!include WinMessages.nsh
+!include FileFunc.nsh
+
+Name "nsDialogs Welcome"
+OutFile "nsDialogs Welcome.exe"
+
+Page custom nsDialogsWelcome
+Page custom nsDialogsDirectory
+!insertmacro MUI_PAGE_INSTFILES
+
+!insertmacro MUI_LANGUAGE English
+
+
+Var DIALOG
+Var HEADLINE
+Var TEXT
+Var IMAGECTL
+Var IMAGE
+Var DIRECTORY
+Var FREESPACE
+
+Var HEADLINE_FONT
+
+Function .onInit
+
+ CreateFont $HEADLINE_FONT "$(^Font)" "14" "700"
+
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\welcome.bmp "${NSISDIR}\Contrib\Graphics\Wizard\orange-nsis.bmp"
+
+FunctionEnd
+
+Function HideControls
+
+ LockWindow on
+ GetDlgItem $0 $HWNDPARENT 1028
+ ShowWindow $0 ${SW_HIDE}
+
+ GetDlgItem $0 $HWNDPARENT 1256
+ ShowWindow $0 ${SW_HIDE}
+
+ GetDlgItem $0 $HWNDPARENT 1035
+ ShowWindow $0 ${SW_HIDE}
+
+ GetDlgItem $0 $HWNDPARENT 1037
+ ShowWindow $0 ${SW_HIDE}
+
+ GetDlgItem $0 $HWNDPARENT 1038
+ ShowWindow $0 ${SW_HIDE}
+
+ GetDlgItem $0 $HWNDPARENT 1039
+ ShowWindow $0 ${SW_HIDE}
+
+ GetDlgItem $0 $HWNDPARENT 1045
+ ShowWindow $0 ${SW_NORMAL}
+ LockWindow off
+
+FunctionEnd
+
+Function ShowControls
+
+ LockWindow on
+ GetDlgItem $0 $HWNDPARENT 1028
+ ShowWindow $0 ${SW_NORMAL}
+
+ GetDlgItem $0 $HWNDPARENT 1256
+ ShowWindow $0 ${SW_NORMAL}
+
+ GetDlgItem $0 $HWNDPARENT 1035
+ ShowWindow $0 ${SW_NORMAL}
+
+ GetDlgItem $0 $HWNDPARENT 1037
+ ShowWindow $0 ${SW_NORMAL}
+
+ GetDlgItem $0 $HWNDPARENT 1038
+ ShowWindow $0 ${SW_NORMAL}
+
+ GetDlgItem $0 $HWNDPARENT 1039
+ ShowWindow $0 ${SW_NORMAL}
+
+ GetDlgItem $0 $HWNDPARENT 1045
+ ShowWindow $0 ${SW_HIDE}
+ LockWindow off
+
+FunctionEnd
+
+Function nsDialogsWelcome
+
+ nsDialogs::Create 1044
+ Pop $DIALOG
+
+ nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_BITMAP} 0 0 0 109u 193u ""
+ Pop $IMAGECTL
+
+ StrCpy $0 $PLUGINSDIR\welcome.bmp
+ System::Call 'user32::LoadImage(p 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE})p.s'
+ Pop $IMAGE
+
+ SendMessage $IMAGECTL ${STM_SETIMAGE} ${IMAGE_BITMAP} $IMAGE
+
+ nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 10u -130u 20u "Welcome to nsDialogs!"
+ Pop $HEADLINE
+
+ SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0
+
+ nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 32u -130u -32u "nsDialogs is the next generation of user interfaces in NSIS. It gives the developer full control over custom pages. Some of the features include control text containing variables, callbacks directly into script functions and creation of any type of control. Create boring old edit boxes or load some external library and create custom controls with no need of creating your own plug-in.$\r$\n$\r$\nUnlike InstallOptions, nsDialogs doesn't use INI files to communicate with the script. By interacting directly with the script, nsDialogs can perform much faster without the need of costly, old and inefficient INI operations. Direct interaction also allows direct calls to functions defined in the script and removes the need of conversion functions like Io2Nsis.$\r$\n$\r$\nHit the Next button to see how it all fits into a mock directory page."
+ Pop $TEXT
+
+ SetCtlColors $DIALOG 0 0xffffff
+ SetCtlColors $HEADLINE 0 0xffffff
+ SetCtlColors $TEXT 0 0xffffff
+
+ Call HideControls
+
+ nsDialogs::Show
+
+ Call ShowControls
+
+ System::Call gdi32::DeleteObject(p$IMAGE)
+
+FunctionEnd
+
+!define SHACF_FILESYSTEM 1
+
+Function nsDialogsDirectory
+
+ !insertmacro MUI_HEADER_TEXT "Choose Install Location" "Choose the folder in which to install $(^NameDA)."
+
+ GetDlgItem $0 $HWNDPARENT 1
+ EnableWindow $0 0
+
+ nsDialogs::Create 1018
+ Pop $DIALOG
+
+ nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_CENTER} 0 0 0 100% 30 "Directory page"
+ Pop $HEADLINE
+
+ SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0
+
+ nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 30 100% 40 "Select the installation directory of NSIS to continue. $_CLICK"
+ Pop $TEXT
+
+ nsDialogs::CreateControl EDIT ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${ES_AUTOHSCROLL}|${WS_TABSTOP} ${WS_EX_CLIENTEDGE} 0 75 100% 12u ""
+ Pop $DIRECTORY
+
+ SendMessage $HWNDPARENT ${WM_NEXTDLGCTL} $DIRECTORY 1
+
+ GetFunctionAddress $0 DirChange
+ nsDialogs::OnChange $DIRECTORY $0
+
+ System::Call shlwapi::SHAutoComplete(p$DIRECTORY,i${SHACF_FILESYSTEM})
+
+ nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 -10u 100% 10u ""
+ Pop $FREESPACE
+
+ Call UpdateFreeSpace
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Function UpdateFreeSpace
+
+ ${GetRoot} $INSTDIR $0
+ StrCpy $1 " bytes"
+
+ System::Call kernel32::GetDiskFreeSpaceEx(tr0,*l,*l,*l.r0)
+
+ ${If} $0 > 1024
+ ${OrIf} $0 < 0
+ System::Int64Op $0 / 1024
+ Pop $0
+ StrCpy $1 "kb"
+ ${If} $0 > 1024
+ ${OrIf} $0 < 0
+ System::Int64Op $0 / 1024
+ Pop $0
+ StrCpy $1 "mb"
+ ${If} $0 > 1024
+ ${OrIf} $0 < 0
+ System::Int64Op $0 / 1024
+ Pop $0
+ StrCpy $1 "gb"
+ ${EndIf}
+ ${EndIf}
+ ${EndIf}
+
+ SendMessage $FREESPACE ${WM_SETTEXT} 0 "STR:Free space: $0$1"
+
+FunctionEnd
+
+Function DirChange
+
+ Pop $0 # dir hwnd
+
+ GetDlgItem $0 $HWNDPARENT 1
+
+ System::Call user32::GetWindowText(p$DIRECTORY,t.d,i${NSIS_MAX_STRLEN})
+
+ ${If} ${FileExists} $INSTDIR\makensis.exe
+ EnableWindow $0 1
+ ${Else}
+ EnableWindow $0 0
+ ${EndIf}
+
+ Call UpdateFreeSpace
+
+FunctionEnd
+
+Section
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/nsExec/test.nsi b/KattekerCreator/nsis/Examples/nsExec/test.nsi
new file mode 100644
index 0000000..5a0c931
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/nsExec/test.nsi
@@ -0,0 +1,31 @@
+Name "nsExec Test"
+
+OutFile "nsExec Test.exe"
+
+ShowInstDetails show
+
+Section "Silent MakeNSIS"
+ nsExec::Exec '"${NSISDIR}\makensis.exe"'
+ Pop $0 # return value/error/timeout
+ DetailPrint ""
+ DetailPrint " Return value: $0"
+ DetailPrint ""
+SectionEnd
+
+Section "MakeNSIS commands help"
+ nsExec::ExecToLog '"${NSISDIR}\makensis.exe" /CMDHELP'
+ Pop $0 # return value/error/timeout
+ DetailPrint ""
+ DetailPrint " Return value: $0"
+ DetailPrint ""
+SectionEnd
+
+Section "Output to variable"
+ nsExec::ExecToStack '"${NSISDIR}\makensis.exe" /VERSION'
+ Pop $0 # return value/error/timeout
+ Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
+ DetailPrint '"${NSISDIR}\makensis.exe" /VERSION printed: $1'
+ DetailPrint ""
+ DetailPrint " Return value: $0"
+ DetailPrint ""
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/one-section.nsi b/KattekerCreator/nsis/Examples/one-section.nsi
new file mode 100644
index 0000000..ef3779b
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/one-section.nsi
@@ -0,0 +1,80 @@
+; one-section.nsi
+;
+; This example demonstrates how to control section selection.
+; It allows only one of the sections of a group to be selected.
+
+;--------------------------------
+
+; Section define/macro header file
+; See this header file for more info
+
+!include "Sections.nsh"
+
+;--------------------------------
+
+Name "One Section"
+OutFile "one-section.exe"
+RequestExecutionLevel user
+
+;--------------------------------
+
+; Pages
+
+Page Components
+Page InstFiles
+
+;--------------------------------
+
+; Sections
+
+Section !Required
+ SectionIn RO
+SectionEnd
+
+Section "Group 1 - Option 1" g1o1
+SectionEnd
+
+Section /o "Group 1 - Option 2" g1o2
+SectionEnd
+
+Section /o "Group 1 - Option 3" g1o3
+SectionEnd
+
+Section "Group 2 - Option 1" g2o1
+SectionEnd
+
+Section /o "Group 2 - Option 2" g2o2
+SectionEnd
+
+Section /o "Group 2 - Option 3" g2o3
+SectionEnd
+
+;--------------------------------
+
+; Functions
+
+; $1 stores the status of group 1
+; $2 stores the status of group 2
+
+Function .onInit
+
+ StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default
+ StrCpy $2 ${g2o1} ; Group 2 - Option 1 is selected by default
+
+FunctionEnd
+
+Function .onSelChange
+
+ !insertmacro StartRadioButtons $1
+ !insertmacro RadioButton ${g1o1}
+ !insertmacro RadioButton ${g1o2}
+ !insertmacro RadioButton ${g1o3}
+ !insertmacro EndRadioButtons
+
+ !insertmacro StartRadioButtons $2
+ !insertmacro RadioButton ${g2o1}
+ !insertmacro RadioButton ${g2o2}
+ !insertmacro RadioButton ${g2o3}
+ !insertmacro EndRadioButtons
+
+FunctionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/primes.nsi b/KattekerCreator/nsis/Examples/primes.nsi
new file mode 100644
index 0000000..08a2062
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/primes.nsi
@@ -0,0 +1,70 @@
+; primes.nsi
+;
+; This is an example of the possibities of the NSIS Script language.
+; It calculates prime numbers.
+
+;--------------------------------
+
+Name "primes"
+AllowRootDirInstall true
+OutFile "primes.exe"
+Caption "Prime number generator"
+ShowInstDetails show
+AllowRootDirInstall true
+InstallDir "$EXEDIR"
+RequestExecutionLevel user
+
+DirText "Select a directory to write primes.txt. $_CLICK"
+
+;--------------------------------
+
+;Pages
+
+Page directory
+Page instfiles
+
+;--------------------------------
+
+Section ""
+ SetOutPath $INSTDIR
+ Call DoPrimes
+SectionEnd
+
+;--------------------------------
+
+Function DoPrimes
+
+; we put this in here so it doesn't update the progress bar (faster)
+
+!define PPOS $0 ; position in prime searching
+!define PDIV $1 ; divisor
+!define PMOD $2 ; the result of the modulus
+!define PCNT $3 ; count of how many we've printed
+ FileOpen $9 $INSTDIR\primes.txt w
+
+ DetailPrint "2 is prime!"
+ FileWrite $9 "2 is prime!$\r$\n"
+ DetailPrint "3 is prime!"
+ FileWrite $9 "3 is prime!$\r$\n"
+ Strcpy ${PPOS} 3
+ Strcpy ${PCNT} 2
+outerloop:
+ StrCpy ${PDIV} 3
+ innerloop:
+ IntOp ${PMOD} ${PPOS} % ${PDIV}
+ IntCmp ${PMOD} 0 notprime
+ IntOp ${PDIV} ${PDIV} + 2
+ IntCmp ${PDIV} ${PPOS} 0 innerloop 0
+ DetailPrint "${PPOS} is prime!"
+ FileWrite $9 "${PPOS} is prime!$\r$\n"
+ IntOp ${PCNT} ${PCNT} + 1
+ IntCmp ${PCNT} 100 0 innerloop
+ StrCpy ${PCNT} 0
+ MessageBox MB_YESNO "Process more?" IDNO stop
+ notprime:
+ IntOp ${PPOS} ${PPOS} + 2
+ Goto outerloop
+ stop:
+ FileClose $9
+
+FunctionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/rtest.nsi b/KattekerCreator/nsis/Examples/rtest.nsi
new file mode 100644
index 0000000..0a94515
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/rtest.nsi
@@ -0,0 +1,93 @@
+; rtest.nsi
+;
+; This script tests some advanced NSIS functions.
+
+;--------------------------------
+
+Name "rtest"
+OutFile "rtest.exe"
+
+ComponentText "Select tests!"
+ShowInstDetails show
+
+RequestExecutionLevel user
+
+;--------------------------------
+
+Section "Test 1"
+
+ StrCpy $R0 "a"
+
+ GetFunctionAddress $R1 test1
+ Call $R1
+
+ StrCmp $R0 "a182345678" success
+
+ DetailPrint "Test 1 failed (output: $R0)"
+ Goto end
+
+ success:
+ DetailPrint "Test 1 succeeded (output: $R0)"
+
+ end:
+
+SectionEnd
+
+Function test1
+
+ GetLabelAddress $9 skip
+
+ IntOp $9 $9 - 1
+ StrCpy $R0 $R01
+
+ Call $9
+
+ StrCpy $R0 $R02
+ StrCpy $R0 $R03
+ StrCpy $R0 $R04
+ StrCpy $R0 $R05
+ StrCpy $R0 $R06
+ StrCpy $R0 $R07
+ StrCpy $R0 $R08
+
+ skip:
+
+FunctionEnd
+
+;--------------------------------
+
+Section "Test 2"
+
+ StrCpy $R0 "0"
+ StrCpy $R1 "11"
+
+ Call test2
+
+ StrCmp $R1 "11,10,9,8,7,6,5,4,3,2,1" success
+
+ DetailPrint "Test 2 failed (output: $R1)"
+ Goto end
+
+ success:
+ DetailPrint "Test 2 succeeded (output: $R1)"
+
+ end:
+
+SectionEnd
+
+Function test2
+
+ IntOp $R0 $R0 + 1
+ IntCmp $R0 10 done
+
+ Push $R0
+
+ GetFunctionAddress $R2 test2
+ Call $R2
+
+ Pop $R0
+
+ done:
+ StrCpy $R1 "$R1,$R0"
+
+FunctionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/silent.nsi b/KattekerCreator/nsis/Examples/silent.nsi
new file mode 100644
index 0000000..d0492ce
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/silent.nsi
@@ -0,0 +1,63 @@
+# This example shows how to handle silent installers.
+# In short, you need IfSilent and the /SD switch for MessageBox to make your installer
+# really silent when the /S switch is used.
+
+Name "Silent"
+OutFile "silent.exe"
+RequestExecutionLevel user
+
+# uncomment the following line to make the installer silent by default.
+; SilentInstall silent
+
+Function .onInit
+ # `/SD IDYES' tells MessageBox to automatically choose IDYES if the installer is silent
+ # in this case, the installer can only be silent if the user used the /S switch or if
+ # you've uncommented line number 5
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like the installer to be silent from now on?" \
+ /SD IDYES IDNO no IDYES yes
+
+ # SetSilent can only be used in .onInit and doesn't work well along with `SetSilent silent'
+
+ yes:
+ SetSilent silent
+ Goto done
+ no:
+ SetSilent normal
+ done:
+FunctionEnd
+
+Section
+ IfSilent 0 +2
+ MessageBox MB_OK|MB_ICONINFORMATION 'This is a "silent" installer'
+
+ # there is no need to use IfSilent for this one because the /SD switch takes care of that
+ MessageBox MB_OK|MB_ICONINFORMATION "This is not a silent installer" /SD IDOK
+
+ # when `SetOverwrite on' (which is the default) is used, the installer will show a message
+ # if it can't open a file for writing. On silent installers, the ignore option will be
+ # automatically selected. if `AllowSkipFiles off' (default is on) was used, there is no
+ # ignore option and the cancel option will be automatically selected.
+
+ # on is default
+ ; AllowSkipFiles on
+
+ # lock file
+ FileOpen $0 $TEMP\silentOverwrite w
+ # try to extract - will fail
+ File /oname=$TEMP\silentOverwrite silent.nsi
+ # unlcok
+ FileClose $0
+
+ # this will always show on silent installers because ignore is the option automatically
+ # selected when a file can't be opened for writing on a silent installer
+ MessageBox MB_OK|MB_ICONINFORMATION "This message box always shows if the installer is silent"
+
+ AllowSkipFiles off
+
+ # lock file
+ FileOpen $0 $TEMP\silentOverwrite w
+ # try to extract - will fail
+ File /oname=$TEMP\silentOverwrite silent.nsi
+ # unlcok
+ FileClose $0
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/unicode.nsi b/KattekerCreator/nsis/Examples/unicode.nsi
new file mode 100644
index 0000000..abdf4ff
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/unicode.nsi
@@ -0,0 +1,30 @@
+; unicode is not enabled by default
+; unicode installers will not be able to run on Windows 9x!
+Unicode true
+
+Name "Unicode Games"
+OutFile "unicode.exe"
+
+ShowInstDetails show
+
+XPStyle on
+
+Section "Unicode in UI"
+
+ DetailPrint "Hello World!"
+ DetailPrint "שלום עולם!"
+ DetailPrint "مرحبا العالم!"
+ DetailPrint "こんにちは、世界!"
+ DetailPrint "你好世界!"
+ DetailPrint "привет мир!"
+ DetailPrint "안녕하세요!"
+
+ DetailPrint "${U+00A9}" # arbitrary unicode chars
+
+SectionEnd
+
+Section "Unicode in Files"
+
+ # TODO add file I/O unicode function examples
+
+SectionEnd
diff --git a/KattekerCreator/nsis/Examples/viewhtml.nsi b/KattekerCreator/nsis/Examples/viewhtml.nsi
new file mode 100644
index 0000000..a3dc042
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/viewhtml.nsi
@@ -0,0 +1,53 @@
+; viewhtml.nsi
+;
+; This script creates a silent installer which extracts one (or more) HTML
+; files to a temporary directory, opens Internet Explorer to view the file(s),
+; and when Internet Explorer has quit, deletes the file(s).
+
+;--------------------------------
+
+; The name of the installer (not really used in a silent install)
+Name "ViewHTML"
+
+; Set to silent mode
+SilentInstall silent
+
+; The file to write
+OutFile "viewhtml.exe"
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel user
+
+;--------------------------------
+
+; The stuff to install
+Section ""
+
+ ; Get a temporary filename (in the Windows Temp directory)
+ GetTempFileName $R0
+
+ ; Extract file
+ ; Lets skip this one, it's not built to be showin in IE
+ ; File /oname=$R0 "..\Menu\compiler.html"
+ ; and write our own! :)
+ FileOpen $0 $R0 "w"
+ FileWrite $0 "HTML page for viewhtml.nsi
"
+ FileClose $0
+
+ ; View file
+ ExecWait '"$PROGRAMFILES\Internet Explorer\iexplore.exe" "$R0"'
+
+ ; Note: another way of doing this would be to use ExecShell, but then you
+ ; really couldn't get away with deleting the files. Here is the ExecShell
+ ; line that you would want to use:
+ ;
+ ; ExecShell "open" '"$R0"'
+ ;
+ ; The advantage of this way is that it would use the default browser to
+ ; open the HTML.
+ ;
+
+ ; Delete the files (on reboot if file is in use)
+ Delete /REBOOTOK $R0
+
+SectionEnd
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Examples/waplugin.nsi b/KattekerCreator/nsis/Examples/waplugin.nsi
new file mode 100644
index 0000000..37d74d5
--- /dev/null
+++ b/KattekerCreator/nsis/Examples/waplugin.nsi
@@ -0,0 +1,205 @@
+; waplugin.nsi
+;
+; This script will generate an installer that installs a Winamp 2 plug-in.
+;
+; This installer will automatically alert the user that installation was
+; successful, and ask them whether or not they would like to make the
+; plug-in the default and run Winamp.
+
+;--------------------------------
+
+; Uncomment the next line to enable auto Winamp download
+; !define WINAMP_AUTOINSTALL
+
+; The name of the installer
+Name "TinyVis Plug-in"
+
+; The file to write
+OutFile "waplugin.exe"
+
+; The default installation directory
+InstallDir $PROGRAMFILES\Winamp
+
+; detect winamp path from uninstall string if available
+InstallDirRegKey HKLM \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" \
+ "UninstallString"
+
+; The text to prompt the user to enter a directory
+DirText "Please select your Winamp path below (you will be able to proceed when Winamp is detected):"
+# currently doesn't work - DirShow hide
+
+; automatically close the installer when done.
+AutoCloseWindow true
+
+; hide the "show details" box
+ShowInstDetails nevershow
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+;--------------------------------
+
+;Pages
+
+Page directory
+Page instfiles
+
+;--------------------------------
+
+; The stuff to install
+
+Section ""
+
+!ifdef WINAMP_AUTOINSTALL
+ Call MakeSureIGotWinamp
+!endif
+
+ Call QueryWinampVisPath
+ SetOutPath $1
+
+ ; File to extract
+ #File "C:\program files\winamp\plugins\vis_nsfs.dll"
+ File /oname=vis_nsfs.dll "${NSISDIR}\Plugins\x86-ansi\TypeLib.dll" # dummy plug-in
+
+ ; prompt user, and if they select no, go to NoWinamp
+ MessageBox MB_YESNO|MB_ICONQUESTION \
+ "The plug-in was installed. Would you like to run Winamp now with TinyVis as the default plug-in?" \
+ IDNO NoWinamp
+ WriteINIStr "$INSTDIR\Winamp.ini" "Winamp" "visplugin_name" "vis_nsfs.dll"
+ WriteINIStr "$INSTDIR\Winamp.ini" "Winamp" "visplugin_num" "0"
+ Exec '"$INSTDIR\Winamp.exe"'
+ NoWinamp:
+
+SectionEnd
+
+;--------------------------------
+
+Function .onVerifyInstDir
+
+!ifndef WINAMP_AUTOINSTALL
+
+ ;Check for Winamp installation
+
+ IfFileExists $INSTDIR\Winamp.exe Good
+ Abort
+ Good:
+
+!endif ; WINAMP_AUTOINSTALL
+
+FunctionEnd
+
+Function QueryWinampVisPath ; sets $1 with vis path
+
+ StrCpy $1 $INSTDIR\Plugins
+ ; use DSPDir instead of VISDir to get DSP plugins directory
+ ReadINIStr $9 $INSTDIR\winamp.ini Winamp VisDir
+ StrCmp $9 "" End
+ IfFileExists $9 0 End
+ StrCpy $1 $9 ; update dir
+ End:
+
+FunctionEnd
+
+!ifdef WINAMP_AUTOINSTALL
+
+Function GetWinampInstPath
+
+ Push $0
+ Push $1
+ Push $2
+ ReadRegStr $0 HKLM \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" \
+ "UninstallString"
+ StrCmp $0 "" fin
+
+ StrCpy $1 $0 1 0 ; get firstchar
+ StrCmp $1 '"' "" getparent
+ ; if first char is ", let's remove "'s first.
+ StrCpy $0 $0 "" 1
+ StrCpy $1 0
+ rqloop:
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '"' rqdone
+ StrCmp $2 "" rqdone
+ IntOp $1 $1 + 1
+ Goto rqloop
+ rqdone:
+ StrCpy $0 $0 $1
+ getparent:
+ ; the uninstall string goes to an EXE, let's get the directory.
+ StrCpy $1 -1
+ gploop:
+ StrCpy $2 $0 1 $1
+ StrCmp $2 "" gpexit
+ StrCmp $2 "\" gpexit
+ IntOp $1 $1 - 1
+ Goto gploop
+ gpexit:
+ StrCpy $0 $0 $1
+
+ StrCmp $0 "" fin
+ IfFileExists $0\winamp.exe fin
+ StrCpy $0 ""
+ fin:
+ Pop $2
+ Pop $1
+ Exch $0
+
+FunctionEnd
+
+Function MakeSureIGotWinamp
+
+ Call GetWinampInstPath
+
+ Pop $0
+ StrCmp $0 "" getwinamp
+ Return
+
+ getwinamp:
+
+ Call ConnectInternet ;Make an internet connection (if no connection available)
+
+ StrCpy $2 "$TEMP\Winamp Installer.exe"
+ NSISdl::download http://download.nullsoft.com/winamp/client/winamp281_lite.exe $2
+ Pop $0
+ StrCmp $0 success success
+ SetDetailsView show
+ DetailPrint "download failed: $0"
+ Abort
+ success:
+ ExecWait '"$2" /S'
+ Delete $2
+ Call GetWinampInstPath
+ Pop $0
+ StrCmp $0 "" skip
+ StrCpy $INSTDIR $0
+ skip:
+
+FunctionEnd
+
+Function ConnectInternet
+
+ Push $R0
+
+ ClearErrors
+ Dialer::AttemptConnect
+ IfErrors noie3
+
+ Pop $R0
+ StrCmp $R0 "online" connected
+ MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
+ Quit
+
+ noie3:
+
+ ; IE3 not installed
+ MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
+
+ connected:
+
+ Pop $R0
+
+FunctionEnd
+
+!endif ; WINAMP_AUTOINSTALL
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/Colors.nsh b/KattekerCreator/nsis/Include/Colors.nsh
new file mode 100644
index 0000000..64ca3a1
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Colors.nsh
@@ -0,0 +1,75 @@
+!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
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/FileFunc.nsh b/KattekerCreator/nsis/Include/FileFunc.nsh
new file mode 100644
index 0000000..76f4cbe
--- /dev/null
+++ b/KattekerCreator/nsis/Include/FileFunc.nsh
@@ -0,0 +1,2015 @@
+/*
+_____________________________________________________________________________
+
+ File Functions Header v3.4
+_____________________________________________________________________________
+
+ 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+ See documentation for more information about the following functions.
+
+ Usage in script:
+ 1. !include "FileFunc.nsh"
+ 2. [Section|Function]
+ ${FileFunction} "Param1" "Param2" "..." $var
+ [SectionEnd|FunctionEnd]
+
+
+ FileFunction=[Locate|GetSize|DriveSpace|GetDrives|GetTime|GetFileAttributes|
+ GetFileVersion|GetExeName|GetExePath|GetParameters|GetOptions|
+ GetOptionsS|GetRoot|GetParent|GetFileName|GetBaseName|GetFileExt|
+ BannerTrimPath|DirState|RefreshShellIcons]
+
+_____________________________________________________________________________
+
+ Thanks to:
+_____________________________________________________________________________
+
+GetSize
+ KiCHiK (Function "FindFiles")
+DriveSpace
+ sunjammer (Function "CheckSpaceFree")
+GetDrives
+ deguix (Based on his idea of Function "DetectDrives")
+GetTime
+ Takhir (Script "StatTest") and deguix (Function "FileModifiedDate")
+GetFileVersion
+ KiCHiK (Based on his example for command "GetDLLVersion")
+GetParameters
+ sunjammer (Based on his Function "GetParameters")
+GetRoot
+ KiCHiK (Based on his Function "GetRoot")
+GetParent
+ sunjammer (Based on his Function "GetParent")
+GetFileName
+ KiCHiK (Based on his Function "GetFileName")
+GetBaseName
+ comperio (Based on his idea of Function "GetBaseName")
+GetFileExt
+ opher (author)
+RefreshShellIcons
+ jerome tremblay (author)
+*/
+
+
+;_____________________________________________________________________________
+;
+; Macros
+;_____________________________________________________________________________
+;
+; Change log window verbosity (default: 3=no script)
+;
+; Example:
+; !include "FileFunc.nsh"
+; !insertmacro Locate
+; ${FILEFUNC_VERBOSE} 4 # all verbosity
+; !insertmacro VersionCompare
+; ${FILEFUNC_VERBOSE} 3 # no script
+
+!ifndef FILEFUNC_INCLUDED
+
+!verbose push 3
+!define /IfNDef _FILEFUNC_VERBOSE 3
+!verbose ${_FILEFUNC_VERBOSE}
+!define FILEFUNC_VERBOSE `!insertmacro FILEFUNC_VERBOSE`
+
+!define FILEFUNC_INCLUDED
+
+!include Util.nsh
+
+
+!macro FILEFUNC_VERBOSE _VERBOSE
+ !verbose push 3
+ !define /ReDef _FILEFUNC_VERBOSE ${_VERBOSE}
+ !verbose pop
+!macroend
+
+!macro LocateCall _PATH _OPTIONS _FUNC
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push $0
+ Push `${_PATH}`
+ Push `${_OPTIONS}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ ${CallArtificialFunction} Locate_
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro GetSizeCall _PATH _OPTIONS _RESULT1 _RESULT2 _RESULT3
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_OPTIONS}`
+ ${CallArtificialFunction} GetSize_
+ Pop ${_RESULT1}
+ Pop ${_RESULT2}
+ Pop ${_RESULT3}
+ !verbose pop
+!macroend
+
+!macro DriveSpaceCall _DRIVE _OPTIONS _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_DRIVE}`
+ Push `${_OPTIONS}`
+ ${CallArtificialFunction} DriveSpace_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetDrivesCall _DRV _FUNC
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push $0
+ Push `${_DRV}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ ${CallArtificialFunction} GetDrives_
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro GetTimeCall _FILE _OPTION _RESULT1 _RESULT2 _RESULT3 _RESULT4 _RESULT5 _RESULT6 _RESULT7
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_OPTION}`
+ ${CallArtificialFunction} GetTime_
+ Pop ${_RESULT1}
+ Pop ${_RESULT2}
+ Pop ${_RESULT3}
+ Pop ${_RESULT4}
+ Pop ${_RESULT5}
+ Pop ${_RESULT6}
+ Pop ${_RESULT7}
+ !verbose pop
+!macroend
+
+!macro GetFileAttributesCall _PATH _ATTR _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_ATTR}`
+ ${CallArtificialFunction} GetFileAttributes_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetFileVersionCall _FILE _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILE}`
+ ${CallArtificialFunction} GetFileVersion_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetExeNameCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ ${CallArtificialFunction} GetExeName_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetExePathCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ ${CallArtificialFunction} GetExePath_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetParametersCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ ${CallArtificialFunction} GetParameters_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetOptionsCall _PARAMETERS _OPTION _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PARAMETERS}`
+ Push `${_OPTION}`
+ ${CallArtificialFunction} GetOptions_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetOptionsSCall _PARAMETERS _OPTION _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PARAMETERS}`
+ Push `${_OPTION}`
+ ${CallArtificialFunction} GetOptionsS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetRootCall _FULLPATH _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FULLPATH}`
+ ${CallArtificialFunction} GetRoot_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetParentCall _PATHSTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATHSTRING}`
+ ${CallArtificialFunction} GetParent_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetFileNameCall _PATHSTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATHSTRING}`
+ ${CallArtificialFunction} GetFileName_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetBaseNameCall _FILESTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILESTRING}`
+ ${CallArtificialFunction} GetBaseName_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetFileExtCall _FILESTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILESTRING}`
+ ${CallArtificialFunction} GetFileExt_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro BannerTrimPathCall _PATH _LENGHT _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_LENGHT}`
+ ${CallArtificialFunction} BannerTrimPath_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro DirStateCall _PATH _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ ${CallArtificialFunction} DirState_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro RefreshShellIconsCall
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ ${CallArtificialFunction} RefreshShellIcons_
+ !verbose pop
+!macroend
+
+!define Locate `!insertmacro LocateCall`
+!define un.Locate `!insertmacro LocateCall`
+
+!macro Locate
+!macroend
+
+!macro un.Locate
+!macroend
+
+!macro Locate_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R6
+ Push $R7
+ Push $R8
+ Push $R9
+ ClearErrors
+
+ StrCpy $3 ''
+ StrCpy $4 ''
+ StrCpy $5 ''
+ StrCpy $6 ''
+ StrCpy $7 ''
+ StrCpy $8 0
+ StrCpy $R7 ''
+
+ StrCpy $R9 $0 1 -1
+ StrCmp $R9 '\' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+ IfFileExists '$0\*.*' 0 FileFunc_Locate_error
+
+ FileFunc_Locate_option:
+ StrCpy $R9 $1 1
+ StrCpy $1 $1 '' 1
+ StrCmp $R9 ' ' -2
+ StrCmp $R9 '' FileFunc_Locate_sizeset
+ StrCmp $R9 '/' 0 -4
+ StrCpy $9 -1
+ IntOp $9 $9 + 1
+ StrCpy $R9 $1 1 $9
+ StrCmp $R9 '' +2
+ StrCmp $R9 '/' 0 -3
+ StrCpy $R8 $1 $9
+ StrCpy $R8 $R8 '' 2
+ StrCpy $R9 $R8 '' -1
+ StrCmp $R9 ' ' 0 +3
+ StrCpy $R8 $R8 -1
+ goto -3
+ StrCpy $R9 $1 2
+ StrCpy $1 $1 '' $9
+
+ StrCmp $R9 'L=' 0 FileFunc_Locate_mask
+ StrCpy $3 $R8
+ StrCmp $3 '' +6
+ StrCmp $3 'FD' +5
+ StrCmp $3 'F' +4
+ StrCmp $3 'D' +3
+ StrCmp $3 'DE' +2
+ StrCmp $3 'FDE' 0 FileFunc_Locate_error
+ goto FileFunc_Locate_option
+
+ FileFunc_Locate_mask:
+ StrCmp $R9 'M=' 0 FileFunc_Locate_size
+ StrCpy $4 $R8
+ goto FileFunc_Locate_option
+
+ FileFunc_Locate_size:
+ StrCmp $R9 'S=' 0 FileFunc_Locate_gotosubdir
+ StrCpy $6 $R8
+ goto FileFunc_Locate_option
+
+ FileFunc_Locate_gotosubdir:
+ StrCmp $R9 'G=' 0 FileFunc_Locate_banner
+ StrCpy $7 $R8
+ StrCmp $7 '' +3
+ StrCmp $7 '1' +2
+ StrCmp $7 '0' 0 FileFunc_Locate_error
+ goto FileFunc_Locate_option
+
+ FileFunc_Locate_banner:
+ StrCmp $R9 'B=' 0 FileFunc_Locate_error
+ StrCpy $R7 $R8
+ StrCmp $R7 '' +3
+ StrCmp $R7 '1' +2
+ StrCmp $R7 '0' 0 FileFunc_Locate_error
+ goto FileFunc_Locate_option
+
+ FileFunc_Locate_sizeset:
+ StrCmp $6 '' FileFunc_Locate_default
+ StrCpy $9 0
+ StrCpy $R9 $6 1 $9
+ StrCmp $R9 '' +4
+ StrCmp $R9 ':' +3
+ IntOp $9 $9 + 1
+ goto -4
+ StrCpy $5 $6 $9
+ IntOp $9 $9 + 1
+ StrCpy $1 $6 1 -1
+ StrCpy $6 $6 -1 $9
+ StrCmp $5 '' +2
+ IntOp $5 $5 + 0
+ StrCmp $6 '' +2
+ IntOp $6 $6 + 0
+
+ StrCmp $1 'B' 0 +3
+ StrCpy $1 1
+ goto FileFunc_Locate_default
+ StrCmp $1 'K' 0 +3
+ StrCpy $1 1024
+ goto FileFunc_Locate_default
+ StrCmp $1 'M' 0 +3
+ StrCpy $1 1048576
+ goto FileFunc_Locate_default
+ StrCmp $1 'G' 0 FileFunc_Locate_error
+ StrCpy $1 1073741824
+
+ FileFunc_Locate_default:
+ StrCmp $3 '' 0 +2
+ StrCpy $3 'FD'
+ StrCmp $4 '' 0 +2
+ StrCpy $4 '*.*'
+ StrCmp $7 '' 0 +2
+ StrCpy $7 '1'
+ StrCmp $R7 '' 0 +2
+ StrCpy $R7 '0'
+ StrCpy $7 'G$7B$R7'
+
+ StrCpy $8 1
+ Push $0
+ SetDetailsPrint textonly
+
+ FileFunc_Locate_nextdir:
+ IntOp $8 $8 - 1
+ Pop $R8
+
+ StrCpy $9 $7 2 2
+ StrCmp $9 'B0' +3
+ GetLabelAddress $9 FileFunc_Locate_findfirst
+ goto call
+ DetailPrint 'Search in: $R8'
+
+ FileFunc_Locate_findfirst:
+ FindFirst $0 $R7 '$R8\$4'
+ IfErrors FileFunc_Locate_subdir
+ StrCmp $R7 '.' 0 FileFunc_Locate_dir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 FileFunc_Locate_dir
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_Locate_dir
+ FindClose $0
+ goto FileFunc_Locate_subdir
+
+ FileFunc_Locate_dir:
+ IfFileExists '$R8\$R7\*.*' 0 FileFunc_Locate_file
+ StrCpy $R6 ''
+ StrCmp $3 'DE' +4
+ StrCmp $3 'FDE' +3
+ StrCmp $3 'FD' FileFunc_Locate_precall
+ StrCmp $3 'F' FileFunc_Locate_findnext FileFunc_Locate_precall
+ FindFirst $9 $R9 '$R8\$R7\*.*'
+ StrCmp $R9 '.' 0 +4
+ FindNext $9 $R9
+ StrCmp $R9 '..' 0 +2
+ FindNext $9 $R9
+ FindClose $9
+ IfErrors FileFunc_Locate_precall FileFunc_Locate_findnext
+
+ FileFunc_Locate_file:
+ StrCmp $3 'FDE' +3
+ StrCmp $3 'FD' +2
+ StrCmp $3 'F' 0 FileFunc_Locate_findnext
+ StrCpy $R6 0
+ StrCmp $5$6 '' FileFunc_Locate_precall
+ FileOpen $9 '$R8\$R7' r
+ IfErrors +3
+ FileSeek $9 0 END $R6
+ FileClose $9
+ System::Int64Op $R6 / $1
+ Pop $R6
+ StrCmp $5 '' +2
+ IntCmp $R6 $5 0 FileFunc_Locate_findnext
+ StrCmp $6 '' +2
+ IntCmp $R6 $6 0 0 FileFunc_Locate_findnext
+
+ FileFunc_Locate_precall:
+ StrCpy $9 0
+ StrCpy $R9 '$R8\$R7'
+
+ call:
+ Push $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R7
+ Push $R8
+ StrCmp $9 0 +4
+ StrCpy $R6 ''
+ StrCpy $R7 ''
+ StrCpy $R9 ''
+ Call $2
+ Pop $R9
+ Pop $R8
+ Pop $R7
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ IfErrors 0 +3
+ FindClose $0
+ goto FileFunc_Locate_error
+ StrCmp $R9 'StopLocate' 0 +3
+ FindClose $0
+ goto FileFunc_Locate_clearstack
+ goto $9
+
+ FileFunc_Locate_findnext:
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_Locate_dir
+ FindClose $0
+
+ FileFunc_Locate_subdir:
+ StrCpy $9 $7 2
+ StrCmp $9 'G0' FileFunc_Locate_end
+ FindFirst $0 $R7 '$R8\*.*'
+ StrCmp $R7 '.' 0 FileFunc_Locate_pushdir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 FileFunc_Locate_pushdir
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_Locate_pushdir
+ FindClose $0
+ StrCmp $8 0 FileFunc_Locate_end FileFunc_Locate_nextdir
+
+ FileFunc_Locate_pushdir:
+ IfFileExists '$R8\$R7\*.*' 0 +3
+ Push '$R8\$R7'
+ IntOp $8 $8 + 1
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_Locate_pushdir
+ FindClose $0
+ StrCmp $8 0 FileFunc_Locate_end FileFunc_Locate_nextdir
+
+ FileFunc_Locate_error:
+ SetErrors
+
+ FileFunc_Locate_clearstack:
+ StrCmp $8 0 FileFunc_Locate_end
+ IntOp $8 $8 - 1
+ Pop $R8
+ goto FileFunc_Locate_clearstack
+
+ FileFunc_Locate_end:
+ SetDetailsPrint both
+ Pop $R9
+ Pop $R8
+ Pop $R7
+ Pop $R6
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ !verbose pop
+!macroend
+
+!define GetSize `!insertmacro GetSizeCall`
+!define un.GetSize `!insertmacro GetSizeCall`
+
+!macro GetSize
+!macroend
+
+!macro un.GetSize
+!macroend
+
+!macro GetSize_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R3
+ Push $R4
+ Push $R5
+ Push $R6
+ Push $R7
+ Push $R8
+ Push $R9
+ ClearErrors
+
+ StrCpy $R9 $0 1 -1
+ StrCmp $R9 '\' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+ IfFileExists '$0\*.*' 0 FileFunc_GetSize_error
+
+ StrCpy $3 ''
+ StrCpy $4 ''
+ StrCpy $5 ''
+ StrCpy $6 ''
+ StrCpy $8 0
+ StrCpy $R3 ''
+ StrCpy $R4 ''
+ StrCpy $R5 ''
+
+ FileFunc_GetSize_option:
+ StrCpy $R9 $1 1
+ StrCpy $1 $1 '' 1
+ StrCmp $R9 ' ' -2
+ StrCmp $R9 '' FileFunc_GetSize_sizeset
+ StrCmp $R9 '/' 0 -4
+
+ StrCpy $9 -1
+ IntOp $9 $9 + 1
+ StrCpy $R9 $1 1 $9
+ StrCmp $R9 '' +2
+ StrCmp $R9 '/' 0 -3
+ StrCpy $8 $1 $9
+ StrCpy $8 $8 '' 2
+ StrCpy $R9 $8 '' -1
+ StrCmp $R9 ' ' 0 +3
+ StrCpy $8 $8 -1
+ goto -3
+ StrCpy $R9 $1 2
+ StrCpy $1 $1 '' $9
+
+ StrCmp $R9 'M=' 0 FileFunc_GetSize_size
+ StrCpy $4 $8
+ goto FileFunc_GetSize_option
+
+ FileFunc_GetSize_size:
+ StrCmp $R9 'S=' 0 FileFunc_GetSize_gotosubdir
+ StrCpy $6 $8
+ goto FileFunc_GetSize_option
+
+ FileFunc_GetSize_gotosubdir:
+ StrCmp $R9 'G=' 0 FileFunc_GetSize_error
+ StrCpy $7 $8
+ StrCmp $7 '' +3
+ StrCmp $7 '1' +2
+ StrCmp $7 '0' 0 FileFunc_GetSize_error
+ goto FileFunc_GetSize_option
+
+ FileFunc_GetSize_sizeset:
+ StrCmp $6 '' FileFunc_GetSize_default
+ StrCpy $9 0
+ StrCpy $R9 $6 1 $9
+ StrCmp $R9 '' +4
+ StrCmp $R9 ':' +3
+ IntOp $9 $9 + 1
+ goto -4
+ StrCpy $5 $6 $9
+ IntOp $9 $9 + 1
+ StrCpy $1 $6 1 -1
+ StrCpy $6 $6 -1 $9
+ StrCmp $5 '' +2
+ IntOp $5 $5 + 0
+ StrCmp $6 '' +2
+ IntOp $6 $6 + 0
+
+ StrCmp $1 'B' 0 +4
+ StrCpy $1 1
+ StrCpy $2 bytes
+ goto FileFunc_GetSize_default
+ StrCmp $1 'K' 0 +4
+ StrCpy $1 1024
+ StrCpy $2 Kb
+ goto FileFunc_GetSize_default
+ StrCmp $1 'M' 0 +4
+ StrCpy $1 1048576
+ StrCpy $2 Mb
+ goto FileFunc_GetSize_default
+ StrCmp $1 'G' 0 FileFunc_GetSize_error
+ StrCpy $1 1073741824
+ StrCpy $2 Gb
+
+ FileFunc_GetSize_default:
+ StrCmp $4 '' 0 +2
+ StrCpy $4 '*.*'
+ StrCmp $7 '' 0 +2
+ StrCpy $7 '1'
+
+ StrCpy $8 1
+ Push $0
+ SetDetailsPrint textonly
+
+ FileFunc_GetSize_nextdir:
+ IntOp $8 $8 - 1
+ Pop $R8
+ FindFirst $0 $R7 '$R8\$4'
+ IfErrors FileFunc_GetSize_show
+ StrCmp $R7 '.' 0 FileFunc_GetSize_dir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 FileFunc_GetSize_dir
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_GetSize_dir
+ FindClose $0
+ goto FileFunc_GetSize_show
+
+ FileFunc_GetSize_dir:
+ IfFileExists '$R8\$R7\*.*' 0 FileFunc_GetSize_file
+ IntOp $R5 $R5 + 1
+ goto FileFunc_GetSize_findnext
+
+ FileFunc_GetSize_file:
+ StrCpy $R6 0
+ StrCmp $5$6 '' 0 +3
+ IntOp $R4 $R4 + 1
+ goto FileFunc_GetSize_findnext
+ FileOpen $9 '$R8\$R7' r
+ IfErrors +3
+ FileSeek $9 0 END $R6
+ FileClose $9
+ StrCmp $5 '' +2
+ IntCmp $R6 $5 0 FileFunc_GetSize_findnext
+ StrCmp $6 '' +2
+ IntCmp $R6 $6 0 0 FileFunc_GetSize_findnext
+ IntOp $R4 $R4 + 1
+ System::Int64Op $R3 + $R6
+ Pop $R3
+
+ FileFunc_GetSize_findnext:
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_GetSize_dir
+ FindClose $0
+
+ FileFunc_GetSize_show:
+ StrCmp $5$6 '' FileFunc_GetSize_nosize
+ System::Int64Op $R3 / $1
+ Pop $9
+ DetailPrint 'Size:$9 $2 Files:$R4 Folders:$R5'
+ goto FileFunc_GetSize_subdir
+ FileFunc_GetSize_nosize:
+ DetailPrint 'Files:$R4 Folders:$R5'
+
+ FileFunc_GetSize_subdir:
+ StrCmp $7 0 FileFunc_GetSize_preend
+ FindFirst $0 $R7 '$R8\*.*'
+ StrCmp $R7 '.' 0 FileFunc_GetSize_pushdir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 FileFunc_GetSize_pushdir
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_GetSize_pushdir
+ FindClose $0
+ StrCmp $8 0 FileFunc_GetSize_preend FileFunc_GetSize_nextdir
+
+ FileFunc_GetSize_pushdir:
+ IfFileExists '$R8\$R7\*.*' 0 +3
+ Push '$R8\$R7'
+ IntOp $8 $8 + 1
+ FindNext $0 $R7
+ IfErrors 0 FileFunc_GetSize_pushdir
+ FindClose $0
+ StrCmp $8 0 FileFunc_GetSize_preend FileFunc_GetSize_nextdir
+
+ FileFunc_GetSize_preend:
+ StrCmp $R3 '' FileFunc_GetSize_nosizeend
+ System::Int64Op $R3 / $1
+ Pop $R3
+ FileFunc_GetSize_nosizeend:
+ StrCpy $2 $R4
+ StrCpy $1 $R5
+ StrCpy $0 $R3
+ goto FileFunc_GetSize_end
+
+ FileFunc_GetSize_error:
+ SetErrors
+ StrCpy $0 ''
+ StrCpy $1 ''
+ StrCpy $2 ''
+
+ FileFunc_GetSize_end:
+ SetDetailsPrint both
+ Pop $R9
+ Pop $R8
+ Pop $R7
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Exch $2
+ Exch
+ Exch $1
+ Exch 2
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define DriveSpace `!insertmacro DriveSpaceCall`
+!define un.DriveSpace `!insertmacro DriveSpaceCall`
+
+!macro DriveSpace
+!macroend
+
+!macro un.DriveSpace
+!macroend
+
+!macro DriveSpace_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ ClearErrors
+
+ StrCpy $2 $0 1 -1
+ StrCmp $2 '\' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+ IfFileExists '$0\NUL' 0 FileFunc_DriveSpace_error
+
+ StrCpy $5 ''
+ StrCpy $6 ''
+
+ FileFunc_DriveSpace_option:
+ StrCpy $2 $1 1
+ StrCpy $1 $1 '' 1
+ StrCmp $2 ' ' -2
+ StrCmp $2 '' FileFunc_DriveSpace_default
+ StrCmp $2 '/' 0 -4
+ StrCpy $3 -1
+ IntOp $3 $3 + 1
+ StrCpy $2 $1 1 $3
+ StrCmp $2 '' +2
+ StrCmp $2 '/' 0 -3
+ StrCpy $4 $1 $3
+ StrCpy $4 $4 '' 2
+ StrCpy $2 $4 1 -1
+ StrCmp $2 ' ' 0 +3
+ StrCpy $4 $4 -1
+ goto -3
+ StrCpy $2 $1 2
+ StrCpy $1 $1 '' $3
+
+ StrCmp $2 'D=' 0 FileFunc_DriveSpace_unit
+ StrCpy $5 $4
+ StrCmp $5 '' +4
+ StrCmp $5 'T' +3
+ StrCmp $5 'O' +2
+ StrCmp $5 'F' 0 FileFunc_DriveSpace_error
+ goto FileFunc_DriveSpace_option
+
+ FileFunc_DriveSpace_unit:
+ StrCmp $2 'S=' 0 FileFunc_DriveSpace_error
+ StrCpy $6 $4
+ goto FileFunc_DriveSpace_option
+
+ FileFunc_DriveSpace_default:
+ StrCmp $5 '' 0 +2
+ StrCpy $5 'T'
+ StrCmp $6 '' 0 +3
+ StrCpy $6 '1'
+ goto FileFunc_DriveSpace_getspace
+
+ StrCmp $6 'B' 0 +3
+ StrCpy $6 1
+ goto FileFunc_DriveSpace_getspace
+ StrCmp $6 'K' 0 +3
+ StrCpy $6 1024
+ goto FileFunc_DriveSpace_getspace
+ StrCmp $6 'M' 0 +3
+ StrCpy $6 1048576
+ goto FileFunc_DriveSpace_getspace
+ StrCmp $6 'G' 0 FileFunc_DriveSpace_error
+ StrCpy $6 1073741824
+
+ FileFunc_DriveSpace_getspace:
+ System::Call 'kernel32::GetDiskFreeSpaceEx(t, *l, *l, *l)i(r0,.r2,.r3,.)'
+
+ StrCmp $5 T 0 +3
+ StrCpy $0 $3
+ goto FileFunc_DriveSpace_getsize
+ StrCmp $5 O 0 +4
+ System::Int64Op $3 - $2
+ Pop $0
+ goto FileFunc_DriveSpace_getsize
+ StrCmp $5 F 0 +2
+ StrCpy $0 $2
+
+ FileFunc_DriveSpace_getsize:
+ System::Int64Op $0 / $6
+ Pop $0
+ goto FileFunc_DriveSpace_end
+
+ FileFunc_DriveSpace_error:
+ SetErrors
+ StrCpy $0 ''
+
+ FileFunc_DriveSpace_end:
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetDrives `!insertmacro GetDrivesCall`
+!define un.GetDrives `!insertmacro GetDrivesCall`
+
+!macro GetDrives
+!macroend
+
+!macro un.GetDrives
+!macroend
+
+!macro GetDrives_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $8
+ Push $9
+
+ System::StrAlloc 1024
+ Pop $2
+ System::Call 'kernel32::GetLogicalDriveStrings(i,i) i(1024, r2)'
+
+ StrCmp $0 ALL FileFunc_GetDrives_drivestring
+ StrCmp $0 '' 0 FileFunc_GetDrives_typeset
+ StrCpy $0 ALL
+ goto FileFunc_GetDrives_drivestring
+
+ FileFunc_GetDrives_typeset:
+ StrCpy $6 -1
+ IntOp $6 $6 + 1
+ StrCpy $8 $0 1 $6
+ StrCmp $8$0 '' FileFunc_GetDrives_enumex
+ StrCmp $8 '' +2
+ StrCmp $8 '+' 0 -4
+ StrCpy $8 $0 $6
+ IntOp $6 $6 + 1
+ StrCpy $0 $0 '' $6
+
+ StrCmp $8 'FDD' 0 +3
+ StrCpy $6 2
+ goto FileFunc_GetDrives_drivestring
+ StrCmp $8 'HDD' 0 +3
+ StrCpy $6 3
+ goto FileFunc_GetDrives_drivestring
+ StrCmp $8 'NET' 0 +3
+ StrCpy $6 4
+ goto FileFunc_GetDrives_drivestring
+ StrCmp $8 'CDROM' 0 +3
+ StrCpy $6 5
+ goto FileFunc_GetDrives_drivestring
+ StrCmp $8 'RAM' 0 FileFunc_GetDrives_typeset
+ StrCpy $6 6
+
+ FileFunc_GetDrives_drivestring:
+ StrCpy $3 $2
+
+ FileFunc_GetDrives_enumok:
+ System::Call 'kernel32::lstrlen(t) i(i r3) .r4'
+ StrCmp $4$0 '0ALL' FileFunc_GetDrives_enumex
+ StrCmp $4 0 FileFunc_GetDrives_typeset
+ System::Call 'kernel32::GetDriveType(t) i(i r3) .r5'
+
+ StrCmp $0 ALL +2
+ StrCmp $5 $6 FileFunc_GetDrives_letter FileFunc_GetDrives_enumnext
+ StrCmp $5 2 0 +3
+ StrCpy $8 FDD
+ goto FileFunc_GetDrives_letter
+ StrCmp $5 3 0 +3
+ StrCpy $8 HDD
+ goto FileFunc_GetDrives_letter
+ StrCmp $5 4 0 +3
+ StrCpy $8 NET
+ goto FileFunc_GetDrives_letter
+ StrCmp $5 5 0 +3
+ StrCpy $8 CDROM
+ goto FileFunc_GetDrives_letter
+ StrCmp $5 6 0 FileFunc_GetDrives_enumex
+ StrCpy $8 RAM
+
+ FileFunc_GetDrives_letter:
+ System::Call '*$3(&t1024 .r9)'
+
+ Push $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $8
+ Call $1
+ Pop $9
+ Pop $8
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ StrCmp $9 'StopGetDrives' FileFunc_GetDrives_enumex
+
+ FileFunc_GetDrives_enumnext:
+ IntOp $4 $4 * ${NSIS_CHAR_SIZE}
+ IntOp $3 $3 + $4
+ IntOp $3 $3 + ${NSIS_CHAR_SIZE}
+ goto FileFunc_GetDrives_enumok
+
+ FileFunc_GetDrives_enumex:
+ System::Free $2
+
+ Pop $9
+ Pop $8
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ !verbose pop
+!macroend
+
+!define GetTime `!insertmacro GetTimeCall`
+!define un.GetTime `!insertmacro GetTimeCall`
+
+!macro GetTime
+!macroend
+
+!macro un.GetTime
+!macroend
+
+!macro GetTime_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ ClearErrors
+
+ StrCmp $1 'L' FileFunc_GetTime_gettime
+ StrCmp $1 'A' FileFunc_GetTime_getfile
+ StrCmp $1 'C' FileFunc_GetTime_getfile
+ StrCmp $1 'M' FileFunc_GetTime_getfile
+ StrCmp $1 'LS' FileFunc_GetTime_gettime
+ StrCmp $1 'AS' FileFunc_GetTime_getfile
+ StrCmp $1 'CS' FileFunc_GetTime_getfile
+ StrCmp $1 'MS' FileFunc_GetTime_getfile
+ goto FileFunc_GetTime_error
+
+ FileFunc_GetTime_getfile:
+ IfFileExists $0 0 FileFunc_GetTime_error
+ System::Call '*(i,l,l,l,i,i,i,i,&t260,&t14) p .r6'
+ System::Call 'kernel32::FindFirstFile(t,p)p(r0,r6) .r2'
+ System::Call 'kernel32::FindClose(i)i(r2)'
+
+ FileFunc_GetTime_gettime:
+ System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) p .r7'
+ StrCmp $1 'L' 0 FileFunc_GetTime_systemtime
+ System::Call 'kernel32::GetLocalTime(p)i(r7)'
+ goto FileFunc_GetTime_convert
+ FileFunc_GetTime_systemtime:
+ StrCmp $1 'LS' 0 FileFunc_GetTime_filetime
+ System::Call 'kernel32::GetSystemTime(p)i(r7)'
+ goto FileFunc_GetTime_convert
+
+ FileFunc_GetTime_filetime:
+ System::Call '*$6(i,l,l,l,i,i,i,i,&t260,&t14)p(,.r4,.r3,.r2)'
+ System::Free $6
+ StrCmp $1 'A' 0 +3
+ StrCpy $2 $3
+ goto FileFunc_GetTime_tolocal
+ StrCmp $1 'C' 0 +3
+ StrCpy $2 $4
+ goto FileFunc_GetTime_tolocal
+ StrCmp $1 'M' FileFunc_GetTime_tolocal
+
+ StrCmp $1 'AS' FileFunc_GetTime_tosystem
+ StrCmp $1 'CS' 0 +3
+ StrCpy $3 $4
+ goto FileFunc_GetTime_tosystem
+ StrCmp $1 'MS' 0 +3
+ StrCpy $3 $2
+ goto FileFunc_GetTime_tosystem
+
+ FileFunc_GetTime_tolocal:
+ System::Call 'kernel32::FileTimeToLocalFileTime(*l,*l)i(r2,.r3)'
+ FileFunc_GetTime_tosystem:
+ System::Call 'kernel32::FileTimeToSystemTime(*l,i)i(r3,r7)'
+
+ FileFunc_GetTime_convert:
+ System::Call '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)p(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
+ System::Free $7
+
+ IntCmp $0 9 0 0 +2
+ StrCpy $0 '0$0'
+ IntCmp $1 9 0 0 +2
+ StrCpy $1 '0$1'
+ IntCmp $2 9 0 0 +2
+ StrCpy $2 '0$2'
+ IntCmp $6 9 0 0 +2
+ StrCpy $6 '0$6'
+
+ StrCmp $4 0 0 +3
+ StrCpy $4 Sunday
+ goto FileFunc_GetTime_end
+ StrCmp $4 1 0 +3
+ StrCpy $4 Monday
+ goto FileFunc_GetTime_end
+ StrCmp $4 2 0 +3
+ StrCpy $4 Tuesday
+ goto FileFunc_GetTime_end
+ StrCmp $4 3 0 +3
+ StrCpy $4 Wednesday
+ goto FileFunc_GetTime_end
+ StrCmp $4 4 0 +3
+ StrCpy $4 Thursday
+ goto FileFunc_GetTime_end
+ StrCmp $4 5 0 +3
+ StrCpy $4 Friday
+ goto FileFunc_GetTime_end
+ StrCmp $4 6 0 FileFunc_GetTime_error
+ StrCpy $4 Saturday
+ goto FileFunc_GetTime_end
+
+ FileFunc_GetTime_error:
+ SetErrors
+ StrCpy $0 ''
+ StrCpy $1 ''
+ StrCpy $2 ''
+ StrCpy $3 ''
+ StrCpy $4 ''
+ StrCpy $5 ''
+ StrCpy $6 ''
+
+ FileFunc_GetTime_end:
+ Pop $7
+ Exch $6
+ Exch
+ Exch $5
+ Exch 2
+ Exch $4
+ Exch 3
+ Exch $3
+ Exch 4
+ Exch $2
+ Exch 5
+ Exch $1
+ Exch 6
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetFileAttributes `!insertmacro GetFileAttributesCall`
+!define un.GetFileAttributes `!insertmacro GetFileAttributesCall`
+
+!macro GetFileAttributes
+!macroend
+
+!macro un.GetFileAttributes
+!macroend
+
+!macro GetFileAttributes_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+
+ System::Call 'kernel32::GetFileAttributes(t r0)i .r2'
+ StrCmp $2 -1 FileFunc_GetFileAttributes_error
+ StrCpy $3 ''
+
+ IntOp $0 $2 & 0x4000
+ IntCmp $0 0 +2
+ StrCpy $3 'ENCRYPTED|'
+
+ IntOp $0 $2 & 0x2000
+ IntCmp $0 0 +2
+ StrCpy $3 'NOT_CONTENT_INDEXED|$3'
+
+ IntOp $0 $2 & 0x1000
+ IntCmp $0 0 +2
+ StrCpy $3 'OFFLINE|$3'
+
+ IntOp $0 $2 & 0x0800
+ IntCmp $0 0 +2
+ StrCpy $3 'COMPRESSED|$3'
+
+ IntOp $0 $2 & 0x0400
+ IntCmp $0 0 +2
+ StrCpy $3 'REPARSE_POINT|$3'
+
+ IntOp $0 $2 & 0x0200
+ IntCmp $0 0 +2
+ StrCpy $3 'SPARSE_FILE|$3'
+
+ IntOp $0 $2 & 0x0100
+ IntCmp $0 0 +2
+ StrCpy $3 'TEMPORARY|$3'
+
+ IntOp $0 $2 & 0x0080
+ IntCmp $0 0 +2
+ StrCpy $3 'NORMAL|$3'
+
+ IntOp $0 $2 & 0x0040
+ IntCmp $0 0 +2
+ StrCpy $3 'DEVICE|$3'
+
+ IntOp $0 $2 & 0x0020
+ IntCmp $0 0 +2
+ StrCpy $3 'ARCHIVE|$3'
+
+ IntOp $0 $2 & 0x0010
+ IntCmp $0 0 +2
+ StrCpy $3 'DIRECTORY|$3'
+
+ IntOp $0 $2 & 0x0004
+ IntCmp $0 0 +2
+ StrCpy $3 'SYSTEM|$3'
+
+ IntOp $0 $2 & 0x0002
+ IntCmp $0 0 +2
+ StrCpy $3 'HIDDEN|$3'
+
+ IntOp $0 $2 & 0x0001
+ IntCmp $0 0 +2
+ StrCpy $3 'READONLY|$3'
+
+ StrCpy $0 $3 -1
+ StrCmp $1 '' FileFunc_GetFileAttributes_end
+ StrCmp $1 'ALL' FileFunc_GetFileAttributes_end
+
+ FileFunc_GetFileAttributes_attrcmp:
+ StrCpy $5 0
+ IntOp $5 $5 + 1
+ StrCpy $4 $1 1 $5
+ StrCmp $4 '' +2
+ StrCmp $4 '|' 0 -3
+ StrCpy $2 $1 $5
+ IntOp $5 $5 + 1
+ StrCpy $1 $1 '' $5
+ StrLen $3 $2
+ StrCpy $5 -1
+ IntOp $5 $5 + 1
+ StrCpy $4 $0 $3 $5
+ StrCmp $4 '' FileFunc_GetFileAttributes_notfound
+ StrCmp $4 $2 0 -3
+ StrCmp $1 '' 0 FileFunc_GetFileAttributes_attrcmp
+ StrCpy $0 1
+ goto FileFunc_GetFileAttributes_end
+
+ FileFunc_GetFileAttributes_notfound:
+ StrCpy $0 0
+ goto FileFunc_GetFileAttributes_end
+
+ FileFunc_GetFileAttributes_error:
+ SetErrors
+ StrCpy $0 ''
+
+ FileFunc_GetFileAttributes_end:
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetFileVersion `!insertmacro GetFileVersionCall`
+!define un.GetFileVersion `!insertmacro GetFileVersionCall`
+
+!macro GetFileVersion
+!macroend
+
+!macro un.GetFileVersion
+!macroend
+
+!macro GetFileVersion_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ ClearErrors
+
+ GetDllVersion '$0' $1 $2
+ IfErrors FileFunc_GetFileVersion_error
+ IntOp $3 $1 >> 16
+ IntOp $3 $3 & 0x0000FFFF
+ IntOp $4 $1 & 0x0000FFFF
+ IntOp $5 $2 >> 16
+ IntOp $5 $5 & 0x0000FFFF
+ IntOp $6 $2 & 0x0000FFFF
+ StrCpy $0 '$3.$4.$5.$6'
+ goto FileFunc_GetFileVersion_end
+
+ FileFunc_GetFileVersion_error:
+ SetErrors
+ StrCpy $0 ''
+
+ FileFunc_GetFileVersion_end:
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetExeName `!insertmacro GetExeNameCall`
+!define un.GetExeName `!insertmacro GetExeNameCall`
+
+!macro GetExeName
+!macroend
+
+!macro un.GetExeName
+!macroend
+
+!macro GetExeName_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Push $0
+ Push $1
+ Push $2
+ System::Call 'kernel32::GetModuleFileName(p 0, t .r0, i 1024)'
+ System::Call 'kernel32::GetLongPathName(t r0, t .r1, i 1024)i .r2'
+ StrCmp $2 error +2
+ StrCpy $0 $1
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetExePath `!insertmacro GetExePathCall`
+!define un.GetExePath `!insertmacro GetExePathCall`
+
+!macro GetExePath
+!macroend
+
+!macro un.GetExePath
+!macroend
+
+!macro GetExePath_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Push $0
+ Push $1
+ Push $2
+ StrCpy $0 $EXEDIR
+ System::Call 'kernel32::GetLongPathName(t r0, t .r1, i 1024)i .r2'
+ StrCmp $2 error +2
+ StrCpy $0 $1
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetParameters `!insertmacro GetParametersCall`
+!define un.GetParameters `!insertmacro GetParametersCall`
+
+!macro GetParameters
+!macroend
+
+!macro un.GetParameters
+!macroend
+
+!macro GetParameters_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ ;cmdline-check
+ StrCmp $CMDLINE "" 0 +3
+ Push ""
+ Return
+
+ ;vars
+ Push $0 ;tmp
+ Push $1 ;length
+ Push $2 ;parameter offset
+ Push $3 ;separator
+
+ ;length/offset
+ StrLen $1 $CMDLINE
+ StrCpy $2 2 ;start with third character
+
+ ;separator
+ StrCpy $3 $CMDLINE 1 ;first character
+ StrCmp $3 '"' +2
+ StrCpy $3 ' '
+
+ FileFunc_GetParameters_token: ;finding second separator
+ IntCmp $2 $1 FileFunc_GetParameters_strip 0 FileFunc_GetParameters_strip
+ StrCpy $0 $CMDLINE 1 $2
+ IntOp $2 $2 + 1
+ StrCmp $3 $0 0 FileFunc_GetParameters_token
+
+ FileFunc_GetParameters_strip: ;strip white space
+ IntCmp $2 $1 FileFunc_GetParameters_copy 0 FileFunc_GetParameters_copy
+ StrCpy $0 $CMDLINE 1 $2
+ StrCmp $0 ' ' 0 FileFunc_GetParameters_copy
+ IntOp $2 $2 + 1
+ Goto FileFunc_GetParameters_strip
+
+ FileFunc_GetParameters_copy:
+ StrCpy $0 $CMDLINE "" $2
+
+ ;strip white spaces from end
+ FileFunc_GetParameters_rstrip:
+ StrCpy $1 $0 1 -1
+ StrCmp $1 ' ' 0 FileFunc_GetParameters_done
+ StrCpy $0 $0 -1
+ Goto FileFunc_GetParameters_rstrip
+
+ FileFunc_GetParameters_done:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!macro GetOptionsBody _FILEFUNC_S
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ ClearErrors
+
+ StrCpy $2 $1 '' 1
+ StrCpy $1 $1 1
+ StrLen $3 $2
+ StrCpy $7 0
+
+ FileFunc_GetOptions${_FILEFUNC_S}_begin:
+ StrCpy $4 -1
+ StrCpy $6 ''
+
+ FileFunc_GetOptions${_FILEFUNC_S}_quote:
+ IntOp $4 $4 + 1
+ StrCpy $5 $0 1 $4
+ StrCmp${_FILEFUNC_S} $5$7 '0' FileFunc_GetOptions${_FILEFUNC_S}_notfound
+ StrCmp${_FILEFUNC_S} $5 '' FileFunc_GetOptions${_FILEFUNC_S}_trimright
+ StrCmp${_FILEFUNC_S} $5 '"' 0 +7
+ StrCmp${_FILEFUNC_S} $6 '' 0 +3
+ StrCpy $6 '"'
+ goto FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $6 '"' 0 +3
+ StrCpy $6 ''
+ goto FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $5 `'` 0 +7
+ StrCmp${_FILEFUNC_S} $6 `` 0 +3
+ StrCpy $6 `'`
+ goto FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $6 `'` 0 +3
+ StrCpy $6 ``
+ goto FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $5 '`' 0 +7
+ StrCmp${_FILEFUNC_S} $6 '' 0 +3
+ StrCpy $6 '`'
+ goto FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $6 '`' 0 +3
+ StrCpy $6 ''
+ goto FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $6 '"' FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $6 `'` FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $6 '`' FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $5 $1 0 FileFunc_GetOptions${_FILEFUNC_S}_quote
+ StrCmp${_FILEFUNC_S} $7 0 FileFunc_GetOptions${_FILEFUNC_S}_trimleft FileFunc_GetOptions${_FILEFUNC_S}_trimright
+
+ FileFunc_GetOptions${_FILEFUNC_S}_trimleft:
+ IntOp $4 $4 + 1
+ StrCpy $5 $0 $3 $4
+ StrCmp${_FILEFUNC_S} $5 '' FileFunc_GetOptions${_FILEFUNC_S}_notfound
+ StrCmp${_FILEFUNC_S} $5 $2 0 FileFunc_GetOptions${_FILEFUNC_S}_quote
+ IntOp $4 $4 + $3
+ StrCpy $0 $0 '' $4
+ StrCpy $4 $0 1
+ StrCmp${_FILEFUNC_S} $4 ' ' 0 +3
+ StrCpy $0 $0 '' 1
+ goto -3
+ StrCpy $7 1
+ goto FileFunc_GetOptions${_FILEFUNC_S}_begin
+
+ FileFunc_GetOptions${_FILEFUNC_S}_trimright:
+ StrCpy $0 $0 $4
+ StrCpy $4 $0 1 -1
+ StrCmp${_FILEFUNC_S} $4 ' ' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+ StrCpy $3 $0 1
+ StrCpy $4 $0 1 -1
+ StrCmp${_FILEFUNC_S} $3 $4 0 FileFunc_GetOptions${_FILEFUNC_S}_end
+ StrCmp${_FILEFUNC_S} $3 '"' +3
+ StrCmp${_FILEFUNC_S} $3 `'` +2
+ StrCmp${_FILEFUNC_S} $3 '`' 0 FileFunc_GetOptions${_FILEFUNC_S}_end
+ StrCpy $0 $0 -1 1
+ goto FileFunc_GetOptions${_FILEFUNC_S}_end
+
+ FileFunc_GetOptions${_FILEFUNC_S}_notfound:
+ SetErrors
+ StrCpy $0 ''
+
+ FileFunc_GetOptions${_FILEFUNC_S}_end:
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+!macroend
+
+!define GetOptions `!insertmacro GetOptionsCall`
+!define un.GetOptions `!insertmacro GetOptionsCall`
+
+!macro GetOptions
+!macroend
+
+!macro un.GetOptions
+!macroend
+
+!macro GetOptions_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ !insertmacro GetOptionsBody ''
+
+ !verbose pop
+!macroend
+
+!define GetOptionsS `!insertmacro GetOptionsSCall`
+!define un.GetOptionsS `!insertmacro GetOptionsSCall`
+
+!macro GetOptionsS
+!macroend
+
+!macro un.GetOptionsS
+!macroend
+
+!macro GetOptionsS_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ !insertmacro GetOptionsBody 'S'
+
+ !verbose pop
+!macroend
+
+!define GetRoot `!insertmacro GetRootCall`
+!define un.GetRoot `!insertmacro GetRootCall`
+
+!macro GetRoot
+!macroend
+
+!macro un.GetRoot
+!macroend
+
+!macro GetRoot_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+ Push $3
+
+ StrCpy $1 $0 2
+ StrCmp $1 '\\' FileFunc_GetRoot_UNC
+ StrCpy $2 $1 1 1
+ StrCmp $2 ':' 0 FileFunc_GetRoot_empty
+ StrCpy $0 $1
+ goto FileFunc_GetRoot_end
+
+ FileFunc_GetRoot_UNC:
+ StrCpy $2 1
+ StrCpy $3 ''
+
+ FileFunc_GetRoot_loop:
+ IntOp $2 $2 + 1
+ StrCpy $1 $0 1 $2
+ StrCmp $1$3 '' FileFunc_GetRoot_empty
+ StrCmp $1 '' +5
+ StrCmp $1 '\' 0 FileFunc_GetRoot_loop
+ StrCmp $3 '1' +3
+ StrCpy $3 '1'
+ goto FileFunc_GetRoot_loop
+ StrCpy $0 $0 $2
+ StrCpy $2 $0 1 -1
+ StrCmp $2 '\' 0 FileFunc_GetRoot_end
+
+ FileFunc_GetRoot_empty:
+ StrCpy $0 ''
+
+ FileFunc_GetRoot_end:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetParent `!insertmacro GetParentCall`
+!define un.GetParent `!insertmacro GetParentCall`
+
+!macro GetParent
+!macroend
+
+!macro un.GetParent
+!macroend
+
+!macro GetParent_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+
+ StrCpy $2 $0 1 -1
+ StrCmp $2 '\' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+
+ StrCpy $1 0
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '\' +2
+ StrCmp $2 '' 0 -3
+ StrCpy $0 $0 $1
+
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetFileName `!insertmacro GetFileNameCall`
+!define un.GetFileName `!insertmacro GetFileNameCall`
+
+!macro GetFileName
+!macroend
+
+!macro un.GetFileName
+!macroend
+
+!macro GetFileName_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+
+ StrCpy $2 $0 1 -1
+ StrCmp $2 '\' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+
+ StrCpy $1 0
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '' FileFunc_GetFileName_end
+ StrCmp $2 '\' 0 -3
+ IntOp $1 $1 + 1
+ StrCpy $0 $0 '' $1
+
+ FileFunc_GetFileName_end:
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetBaseName `!insertmacro GetBaseNameCall`
+!define un.GetBaseName `!insertmacro GetBaseNameCall`
+
+!macro GetBaseName
+!macroend
+
+!macro un.GetBaseName
+!macroend
+
+!macro GetBaseName_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+ Push $3
+
+ StrCpy $1 0
+ StrCpy $3 ''
+
+ FileFunc_GetBaseName_loop:
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '' FileFunc_GetBaseName_trimpath
+ StrCmp $2 '\' FileFunc_GetBaseName_trimpath
+ StrCmp $3 'noext' FileFunc_GetBaseName_loop
+ StrCmp $2 '.' 0 FileFunc_GetBaseName_loop
+ StrCpy $0 $0 $1
+ StrCpy $3 'noext'
+ StrCpy $1 0
+ goto FileFunc_GetBaseName_loop
+
+ FileFunc_GetBaseName_trimpath:
+ StrCmp $1 -1 FileFunc_GetBaseName_empty
+ IntOp $1 $1 + 1
+ StrCpy $0 $0 '' $1
+ goto FileFunc_GetBaseName_end
+
+ FileFunc_GetBaseName_empty:
+ StrCpy $0 ''
+
+ FileFunc_GetBaseName_end:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define GetFileExt `!insertmacro GetFileExtCall`
+!define un.GetFileExt `!insertmacro GetFileExtCall`
+
+!macro GetFileExt
+!macroend
+
+!macro un.GetFileExt
+!macroend
+
+!macro GetFileExt_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+
+ StrCpy $1 0
+
+ FileFunc_GetFileExt_loop:
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '' FileFunc_GetFileExt_empty
+ StrCmp $2 '\' FileFunc_GetFileExt_empty
+ StrCmp $2 '.' 0 FileFunc_GetFileExt_loop
+
+ StrCmp $1 -1 FileFunc_GetFileExt_empty
+ IntOp $1 $1 + 1
+ StrCpy $0 $0 '' $1
+ goto FileFunc_GetFileExt_end
+
+ FileFunc_GetFileExt_empty:
+ StrCpy $0 ''
+
+ FileFunc_GetFileExt_end:
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define BannerTrimPath `!insertmacro BannerTrimPathCall`
+!define un.BannerTrimPath `!insertmacro BannerTrimPathCall`
+
+!macro BannerTrimPath
+!macroend
+
+!macro un.BannerTrimPath
+!macroend
+
+!macro BannerTrimPath_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+
+ StrCpy $3 $1 1 -1
+ IntOp $1 $1 + 0
+ StrLen $2 $0
+ IntCmp $2 $1 FileFunc_BannerTrimPath_end FileFunc_BannerTrimPath_end
+ IntOp $1 $1 - 3
+ IntCmp $1 0 FileFunc_BannerTrimPath_empty FileFunc_BannerTrimPath_empty
+ StrCmp $3 'A' FileFunc_BannerTrimPath_A-trim
+ StrCmp $3 'B' FileFunc_BannerTrimPath_B-trim
+ StrCmp $3 'C' FileFunc_BannerTrimPath_C-trim
+ StrCmp $3 'D' FileFunc_BannerTrimPath_D-trim
+
+ FileFunc_BannerTrimPath_A-trim:
+ StrCpy $3 $0 1 1
+ StrCpy $2 0
+ StrCmp $3 ':' 0 +2
+ IntOp $2 $2 + 2
+
+ FileFunc_BannerTrimPath_loopleft:
+ IntOp $2 $2 + 1
+ StrCpy $3 $0 1 $2
+ StrCmp $2 $1 FileFunc_BannerTrimPath_C-trim
+ StrCmp $3 '\' 0 FileFunc_BannerTrimPath_loopleft
+ StrCpy $3 $0 $2
+ IntOp $2 $2 - $1
+ IntCmp $2 0 FileFunc_BannerTrimPath_B-trim 0 FileFunc_BannerTrimPath_B-trim
+
+ FileFunc_BannerTrimPath_loopright:
+ IntOp $2 $2 + 1
+ StrCpy $4 $0 1 $2
+ StrCmp $2 0 FileFunc_BannerTrimPath_B-trim
+ StrCmp $4 '\' 0 FileFunc_BannerTrimPath_loopright
+ StrCpy $4 $0 '' $2
+ StrCpy $0 '$3\...$4'
+ goto FileFunc_BannerTrimPath_end
+
+ FileFunc_BannerTrimPath_B-trim:
+ StrCpy $2 $1
+ IntOp $2 $2 - 1
+ StrCmp $2 -1 FileFunc_BannerTrimPath_C-trim
+ StrCpy $3 $0 1 $2
+ StrCmp $3 '\' 0 -3
+ StrCpy $0 $0 $2
+ StrCpy $0 '$0\...'
+ goto FileFunc_BannerTrimPath_end
+
+ FileFunc_BannerTrimPath_C-trim:
+ StrCpy $0 $0 $1
+ StrCpy $0 '$0...'
+ goto FileFunc_BannerTrimPath_end
+
+ FileFunc_BannerTrimPath_D-trim:
+ StrCpy $3 -1
+ IntOp $3 $3 - 1
+ StrCmp $3 -$2 FileFunc_BannerTrimPath_C-trim
+ StrCpy $4 $0 1 $3
+ StrCmp $4 '\' 0 -3
+ StrCpy $4 $0 '' $3
+ IntOp $3 $1 + $3
+ IntCmp $3 2 FileFunc_BannerTrimPath_C-trim FileFunc_BannerTrimPath_C-trim
+ StrCpy $0 $0 $3
+ StrCpy $0 '$0...$4'
+ goto FileFunc_BannerTrimPath_end
+
+ FileFunc_BannerTrimPath_empty:
+ StrCpy $0 ''
+
+ FileFunc_BannerTrimPath_end:
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define DirState `!insertmacro DirStateCall`
+!define un.DirState `!insertmacro DirStateCall`
+
+!macro DirState
+!macroend
+
+!macro un.DirState
+!macroend
+
+!macro DirState_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ ClearErrors
+
+ FindFirst $1 $0 '$0\*.*'
+ IfErrors 0 +3
+ StrCpy $0 -1
+ goto FileFunc_DirState_end
+ StrCmp $0 '.' 0 +4
+ FindNext $1 $0
+ StrCmp $0 '..' 0 +2
+ FindNext $1 $0
+ FindClose $1
+ IfErrors 0 +3
+ StrCpy $0 0
+ goto FileFunc_DirState_end
+ StrCpy $0 1
+
+ FileFunc_DirState_end:
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define RefreshShellIcons `!insertmacro RefreshShellIconsCall`
+!define un.RefreshShellIcons `!insertmacro RefreshShellIconsCall`
+
+!macro RefreshShellIcons
+!macroend
+
+!macro un.RefreshShellIcons
+!macroend
+
+!macro RefreshShellIcons_
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+
+ System::Call 'shell32::SHChangeNotify(i 0x08000000, i 0, i 0, i 0)'
+
+ !verbose pop
+!macroend
+
+!verbose pop
+!endif
diff --git a/KattekerCreator/nsis/Include/InstallOptions.nsh b/KattekerCreator/nsis/Include/InstallOptions.nsh
new file mode 100644
index 0000000..04cd5b9
--- /dev/null
+++ b/KattekerCreator/nsis/Include/InstallOptions.nsh
@@ -0,0 +1,244 @@
+/*
+
+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
+ ; Call Nsis2Io
+ ; Pop
+
+ 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
+ ; Call Io2Nsis
+ ; Pop
+
+ 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___
diff --git a/KattekerCreator/nsis/Include/LangFile.nsh b/KattekerCreator/nsis/Include/LangFile.nsh
new file mode 100644
index 0000000..c819514
--- /dev/null
+++ b/KattekerCreator/nsis/Include/LangFile.nsh
@@ -0,0 +1,191 @@
+/*
+
+LangFile.nsh
+
+Header file to create language files that can be
+included with a single command.
+
+Copyright 2008-2018 Joost Verburg, Anders Kjersem
+
+* Either LANGFILE_INCLUDE or LANGFILE_INCLUDE_WITHDEFAULT
+ can be called from the script to include a language file.
+
+ - LANGFILE_INCLUDE takes the language file name as parameter.
+ - LANGFILE_INCLUDE_WITHDEFAULT takes as additional second
+ parameter, the default language file to load missing strings from.
+
+* Language strings in the language file have the format:
+ ${LangFileString} LANGSTRING_NAME "Text"
+
+* There are two types of language header files:
+
+ - NSIS multi-lang support; these must start with the LANGFILE macro and
+ provide strings for features like MUI and MultiUser. If you are adding
+ support for a new language to NSIS you should make a copy of English.nsh
+ and translate this .nsh along with the .nlf.
+ - Custom installer strings; these must start with the LANGFILE_EXT macro and
+ contain translated versions of
+ custom strings used in a particular installer.
+ This is useful if you want to put the translations for each language in
+ their own separate file.
+
+* Example:
+
+ ; Setup.nsi
+ !include "MUI.nsh"
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_LANGUAGE "Danish"
+ !insertmacro LANGFILE_INCLUDE "DanishExtra.nsh"
+ !insertmacro MUI_LANGUAGE "Swedish"
+ !insertmacro LANGFILE_INCLUDE "SwedishExtra.nsh"
+ Section
+ MessageBox MB_OK "$(myCustomString)"
+ SectionEnd
+
+ ; SwedishExtra.nsh
+ !insertmacro LANGFILE_EXT Swedish
+ ${LangFileString} myCustomString "Bork bork"
+
+*/
+
+!ifndef LANGFILE_INCLUDED
+!define LANGFILE_INCLUDED
+
+!macro LANGFILE_INCLUDE FILENAME
+
+ ;Called from script: include a language file
+
+ !ifdef LangFileString
+ !undef LangFileString
+ !endif
+
+ !define LangFileString "!insertmacro LANGFILE_SETSTRING"
+
+ !define LANGFILE_SETNAMES
+ !include "${FILENAME}"
+ !undef LANGFILE_SETNAMES
+
+ ;Create language strings
+ !define /redef LangFileString "!insertmacro LANGFILE_LANGSTRING"
+ !include "${FILENAME}"
+
+!macroend
+
+!macro LANGFILE_INCLUDE_WITHDEFAULT FILENAME FILENAME_DEFAULT
+
+ ;Called from script: include a language file
+ ;Obtains missing strings from a default file
+
+ !ifdef LangFileString
+ !undef LangFileString
+ !endif
+
+ !define LangFileString "!insertmacro LANGFILE_SETSTRING"
+
+ !define LANGFILE_SETNAMES
+ !include "${FILENAME}"
+ !undef LANGFILE_SETNAMES
+
+ ;Include default language for missing strings
+ !define LANGFILE_PRIV_INCLUDEISFALLBACK "${FILENAME_DEFAULT}"
+ !include "${FILENAME_DEFAULT}"
+ !undef LANGFILE_PRIV_INCLUDEISFALLBACK
+
+ ;Create language strings
+ !define /redef LangFileString "!insertmacro LANGFILE_LANGSTRING"
+ !include "${FILENAME_DEFAULT}"
+
+!macroend
+
+!macro LANGFILE NLFID ENGNAME NATIVENAME NATIVEASCIINAME
+
+ ;Start of standard NSIS language file
+
+ ; NLFID: Must match the name of the .nlf file
+ ; ENGNAME: English name of language, "=" if it is the same as NLFID
+ ; NATIVENAME: Native name of language. (In Unicode)
+ ; NATIVEASCIINAME: Native name of language using only ASCII, "=" if it is the same as NATIVENAME
+
+ ; Example: LANGFILE "Swedish" = "Svenska" = (This is the same as LANGFILE "Swedish" "Swedish" "Svenska" "Svenska")
+ ; For more examples, see French.nsh, Greek.nsh and PortugueseBR.nsh
+
+ !ifdef LANGFILE_SETNAMES
+
+ !ifdef LANGFILE_IDNAME
+ !undef LANGFILE_IDNAME
+ !endif
+
+ !define LANGFILE_IDNAME "${NLFID}"
+
+ ; ModernUI or the .nsi can change LANGFILE_LANGDLL_FMT if desired
+ !ifndef LANGFILE_LANGDLL_FMT
+ !ifndef NSIS_UNICODE
+ !define LANGFILE_LANGDLL_FMT "%ENGNAME% / %NATIVEASCIINAME%"
+ !endif
+ !define /ifndef LANGFILE_LANGDLL_FMT "%NATIVENAME%"
+ !endif
+
+ !ifndef "LANGFILE_${NLFID}_NAME"
+ !if "${ENGNAME}" == "="
+ !define /redef ENGNAME "${NLFID}"
+ !endif
+ !if "${NATIVEASCIINAME}" == "="
+ !define /redef NATIVEASCIINAME "${NATIVENAME}"
+ !endif
+
+ !define "LANGFILE_${NLFID}_ENGLISHNAME" "${ENGNAME}"
+ !ifdef NSIS_UNICODE
+ !define "LANGFILE_${NLFID}_NAME" "${NATIVENAME}"
+ !else
+ !define "LANGFILE_${NLFID}_NAME" "${NATIVEASCIINAME}"
+ !endif
+
+ !searchreplace LANGFILE_${NLFID}_LANGDLL "${LANGFILE_LANGDLL_FMT}" %NATIVEASCIINAME% "${NATIVEASCIINAME}"
+ !searchreplace LANGFILE_${NLFID}_LANGDLL "${LANGFILE_${NLFID}_LANGDLL}" %NATIVENAME% "${NATIVENAME}"
+ !searchreplace LANGFILE_${NLFID}_LANGDLL "${LANGFILE_${NLFID}_LANGDLL}" %ENGNAME% "${ENGNAME}"
+
+ !endif
+
+ !endif
+
+!macroend
+
+!macro LANGFILE_EXT IDNAME
+
+ ;Start of installer language file
+
+ !ifdef LANGFILE_SETNAMES
+
+ !ifdef LANGFILE_IDNAME
+ !undef LANGFILE_IDNAME
+ !endif
+
+ !define LANGFILE_IDNAME "${IDNAME}"
+
+ !endif
+
+!macroend
+
+!macro LANGFILE_SETSTRING NAME VALUE
+
+ ;Set define with translated string
+
+ !ifndef ${NAME}
+ !define "${NAME}" "${VALUE}"
+ !ifdef LANGFILE_PRIV_INCLUDEISFALLBACK
+ !warning 'LangString "${NAME}" for language ${LANGFILE_IDNAME} is missing, using fallback from "${LANGFILE_PRIV_INCLUDEISFALLBACK}"'
+ !endif
+ !endif
+
+!macroend
+
+!macro LANGFILE_LANGSTRING NAME DUMMY
+
+ ;Create a language string from a define and undefine
+
+ LangString "${NAME}" "${LANG_${LANGFILE_IDNAME}}" "${${NAME}}"
+ !undef "${NAME}"
+
+!macroend
+
+!endif
diff --git a/KattekerCreator/nsis/Include/Library.nsh b/KattekerCreator/nsis/Include/Library.nsh
new file mode 100644
index 0000000..41bcea6
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Library.nsh
@@ -0,0 +1,885 @@
+#
+# 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 INTPUT 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
diff --git a/KattekerCreator/nsis/Include/LogicLib.nsh b/KattekerCreator/nsis/Include/LogicLib.nsh
new file mode 100644
index 0000000..a94e501
--- /dev/null
+++ b/KattekerCreator/nsis/Include/LogicLib.nsh
@@ -0,0 +1,855 @@
+; NSIS LOGIC LIBRARY - LogicLib.nsh
+; Version 2.6 - 08/12/2007
+; By dselkirk@hotmail.com
+; and eccles@users.sf.net
+; with IfNot support added by Message
+;
+; Questions/Comments -
+; See http://forums.winamp.com/showthread.php?s=&postid=1116241
+;
+; Description:
+; Provides the use of various logic statements within NSIS.
+;
+; Usage:
+; The following "statements" are available:
+; If|IfNot|Unless..{ElseIf|ElseIfNot|ElseUnless}..[Else]..EndIf|EndUnless
+; - Conditionally executes a block of statements, depending on the value
+; of an expression. IfNot and Unless are equivalent and
+; interchangeable, as are ElseIfNot and ElseUnless.
+; AndIf|AndIfNot|AndUnless|OrIf|OrIfNot|OrUnless
+; - Adds any number of extra conditions to If, IfNot, Unless, ElseIf,
+; ElseIfNot and ElseUnless statements.
+; IfThen|IfNotThen..|..|
+; - Conditionally executes an inline statement, depending on the value
+; of an expression.
+; IfCmd..||..|
+; - Conditionally executes an inline statement, depending on a true
+; value of the provided NSIS function.
+; Select..{Case[2|3|4|5]}..[CaseElse|Default]..EndSelect
+; - Executes one of several blocks of statements, depending on the value
+; of an expression.
+; Switch..{Case|CaseElse|Default}..EndSwitch
+; - Jumps to one of several labels, depending on the value of an
+; expression.
+; Do[While|Until]..{ExitDo|Continue|Break}..Loop[While|Until]
+; - Repeats a block of statements until stopped, or depending on the
+; value of an expression.
+; While..{ExitWhile|Continue|Break}..EndWhile
+; - An alias for DoWhile..Loop (for backwards-compatibility)
+; For[Each]..{ExitFor|Continue|Break}..Next
+; - Repeats a block of statements varying the value of a variable.
+;
+; The following "expressions" are available:
+; Standard (built-in) string tests (which are case-insensitive):
+; a == b; a != b
+; Additional case-insensitive string tests (using System.dll):
+; a S< b; a S>= b; a S> b; a S<= b
+; Case-sensitive string tests:
+; a S== b; a S!= b
+; Standard (built-in) signed integer tests:
+; a = b; a <> b; a < b; a >= b; a > b; a <= b; a & b
+; Standard (built-in) unsigned integer tests:
+; a U< b; a U>= b; a U> b; a U<= b
+; 64-bit integer tests (using System.dll):
+; a L= b; a L<> b; a L< b; a L>= b; a L> b; a L<= b
+; ptrdiff_t integer tests
+; a P= b; a P<> b; a P< b; a P>= b; a P> b; a P<= b
+; size_t integer tests
+; a Z= b; a Z<> b; a Z< b; a Z>= b; a Z> b; a Z<= b
+; Built-in NSIS flag tests:
+; ${Abort}; ${Errors}; ${RebootFlag}; ${Silent}
+; Built-in NSIS other tests:
+; ${FileExists} a
+; Any conditional NSIS instruction test:
+; ${Cmd} a
+; Section flag tests:
+; ${SectionIsSelected} a; ${SectionIsSectionGroup} a;
+; ${SectionIsSectionGroupEnd} a; ${SectionIsBold} a;
+; ${SectionIsReadOnly} a; ${SectionIsExpanded} a;
+; ${SectionIsPartiallySelected} a
+;
+; Examples:
+; See LogicLib.nsi in the Examples folder for lots of example usage.
+
+!verbose push
+!verbose 3
+!ifndef LOGICLIB_VERBOSITY
+ !define LOGICLIB_VERBOSITY 3
+!endif
+!define _LOGICLIB_VERBOSITY ${LOGICLIB_VERBOSITY}
+!undef LOGICLIB_VERBOSITY
+!verbose ${_LOGICLIB_VERBOSITY}
+
+!ifndef LOGICLIB
+ !define LOGICLIB
+ !define | "'"
+ !define || "' '"
+ !define LOGICLIB_COUNTER 0
+
+ !include Sections.nsh
+
+ !macro _LOGICLIB_TEMP
+ !ifndef _LOGICLIB_TEMP
+ !define _LOGICLIB_TEMP
+ Var /GLOBAL _LOGICLIB_TEMP ; Temporary variable to aid the more elaborate logic tests
+ !endif
+ !macroend
+
+ !macro LogicLib_JumpToBranch _Jump _Skip
+ !if `${_Jump}` != ``
+ StrCmp "" "" `${_Jump}` ${_Skip}
+ !endif
+ !macroend
+
+ !macro _IncreaseCounter
+ !define /redef /math LOGICLIB_COUNTER `${LOGICLIB_COUNTER}` + 1
+ !macroend
+
+ !macro _PushLogic
+ !insertmacro _PushScope Logic _LogicLib_Label_${LOGICLIB_COUNTER}
+ !insertmacro _IncreaseCounter
+ !macroend
+
+ !macro _PopLogic
+ !insertmacro _PopScope Logic
+ !macroend
+
+ !macro _PushScope Type label
+ !ifdef _${Type} ; If we already have a statement
+ !define _Cur${Type} ${_${Type}}
+ !undef _${Type}
+ !define _${Type} ${label}
+ !define ${_${Type}}Prev${Type} ${_Cur${Type}} ; Save the current logic
+ !undef _Cur${Type}
+ !else
+ !define _${Type} ${label} ; Initialise for first statement
+ !endif
+ !macroend
+
+ !macro _PopScope Type
+ !ifndef _${Type}
+ !error "Cannot use _Pop${Type} without a preceding _Push${Type}"
+ !endif
+ !ifdef ${_${Type}}Prev${Type} ; If a previous statment was active then restore it
+ !define _Cur${Type} ${_${Type}}
+ !undef _${Type}
+ !define _${Type} ${${_Cur${Type}}Prev${Type}}
+ !undef ${_Cur${Type}}Prev${Type}
+ !undef _Cur${Type}
+ !else
+ !undef _${Type}
+ !endif
+ !macroend
+
+ ; String tests
+ !macro _== _a _b _t _f
+ StrCmp `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _!= _a _b _t _f
+ !insertmacro _== `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ ; Case-sensitive string tests
+ !macro _S== _a _b _t _f
+ StrCmpS `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _S!= _a _b _t _f
+ !insertmacro _S== `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ ; Extra string tests (cannot do these case-sensitively - I tried and lstrcmp still ignored the case)
+ !macro _StrCmpI _a _b _e _l _m
+ !insertmacro _LOGICLIB_TEMP
+ System::Call `kernel32::lstrcmpi(ts, ts) i.s` `${_a}` `${_b}`
+ Pop $_LOGICLIB_TEMP
+ IntCmp $_LOGICLIB_TEMP 0 `${_e}` `${_l}` `${_m}`
+ !macroend
+
+ !macro _S< _a _b _t _f
+ !insertmacro _StrCmpI `${_a}` `${_b}` `${_f}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _S>= _a _b _t _f
+ !insertmacro _S< `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _S> _a _b _t _f
+ !insertmacro _StrCmpI `${_a}` `${_b}` `${_f}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _S<= _a _b _t _f
+ !insertmacro _S> `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ ; Integer tests
+ !macro _= _a _b _t _f
+ IntCmp `${_a}` `${_b}` `${_t}` `${_f}` `${_f}`
+ !macroend
+
+ !macro _<> _a _b _t _f
+ !insertmacro _= `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _< _a _b _t _f
+ IntCmp `${_a}` `${_b}` `${_f}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _>= _a _b _t _f
+ !insertmacro _< `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _> _a _b _t _f
+ IntCmp `${_a}` `${_b}` `${_f}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _<= _a _b _t _f
+ !insertmacro _> `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _& _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ IntOp $_LOGICLIB_TEMP `${_a}` & `${_b}`
+ !insertmacro _<> $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
+ !macroend
+
+ ; Unsigned integer tests (NB: no need for extra equality tests)
+ !macro _U< _a _b _t _f
+ IntCmpU `${_a}` `${_b}` `${_f}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _U>= _a _b _t _f
+ !insertmacro _U< `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _U> _a _b _t _f
+ IntCmpU `${_a}` `${_b}` `${_f}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _U<= _a _b _t _f
+ !insertmacro _U> `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ ; Int64 tests
+ !macro _Int64Cmp _a _o _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ System::Int64Op `${_a}` `${_o}` `${_b}`
+ Pop $_LOGICLIB_TEMP
+ !insertmacro _= $_LOGICLIB_TEMP 0 `${_f}` `${_t}`
+ !macroend
+
+ !macro _L= _a _b _t _f
+ !insertmacro _Int64Cmp `${_a}` = `${_b}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _L<> _a _b _t _f
+ !insertmacro _L= `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _L< _a _b _t _f
+ !insertmacro _Int64Cmp `${_a}` < `${_b}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _L>= _a _b _t _f
+ !insertmacro _L< `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ !macro _L> _a _b _t _f
+ !insertmacro _Int64Cmp `${_a}` > `${_b}` `${_t}` `${_f}`
+ !macroend
+
+ !macro _L<= _a _b _t _f
+ !insertmacro _L> `${_a}` `${_b}` `${_f}` `${_t}`
+ !macroend
+
+ ; ptrdiff_t & size_t tests
+ !macro LogicLib_PtrDiffTest _o _a _b _t _f
+ !if "${NSIS_PTR_SIZE}" <= 4
+ !insertmacro _${_o} `${_a}` `${_b}` `${_t}` `${_f}`
+ !else
+ !insertmacro _L${_o} `${_a}` `${_b}` `${_t}` `${_f}`
+ !endif
+ !macroend
+ !macro _P= _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest = `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !macro _P<> _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest <> `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !macro _P< _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest < `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !macro _P>= _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest >= `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !macro _P> _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest > `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !macro _P<= _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest <= `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !include Util.nsh
+ !macro _Z= _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest = `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !macro _Z<> _a _b _t _f
+ !insertmacro LogicLib_PtrDiffTest <> `${_a}` `${_b}` `${_t}` `${_f}`
+ !macroend
+ !macro _Z< _a _b _t _f
+ !insertmacro IntPtrCmpU `${_a}` `${_b}` `${_f}` `${_t}` `${_f}`
+ !macroend
+ !macro _Z>= _a _b _t _f
+ !insertmacro IntPtrCmpU `${_a}` `${_b}` `${_t}` `${_f}` `${_t}`
+ !macroend
+ !macro _Z> _a _b _t _f
+ !insertmacro IntPtrCmpU `${_a}` `${_b}` `${_f}` `${_f}` `${_t}`
+ !macroend
+ !macro _Z<= _a _b _t _f
+ !insertmacro IntPtrCmpU `${_a}` `${_b}` `${_t}` `${_t}` `${_f}`
+ !macroend
+
+ ; Flag tests
+ !macro _Abort _a _b _t _f
+ IfAbort `${_t}` `${_f}`
+ !macroend
+ !define Abort `"" Abort ""`
+
+ !macro _Errors _a _b _t _f
+ IfErrors `${_t}` `${_f}`
+ !macroend
+ !define Errors `"" Errors ""`
+
+ !macro _FileExists _a _b _t _f
+ IfFileExists `${_b}` `${_t}` `${_f}`
+ !macroend
+ !define FileExists `"" FileExists`
+
+ !macro _RebootFlag _a _b _t _f
+ IfRebootFlag `${_t}` `${_f}`
+ !macroend
+ !define RebootFlag `"" RebootFlag ""`
+
+ !macro _Silent _a _b _t _f
+ IfSilent `${_t}` `${_f}`
+ !macroend
+ !define Silent `"" Silent ""`
+
+ ; "Any instruction" test
+ !macro _Cmd _a _b _t _f
+ !define _t=${_t}
+ !ifdef _t= ; If no true label then make one
+ !define __t _LogicLib_Label_${LOGICLIB_COUNTER}
+ !insertmacro _IncreaseCounter
+ !else
+ !define __t ${_t}
+ !endif
+ ${_b} ${__t}
+ !define _f=${_f}
+ !ifndef _f= ; If a false label then go there
+ Goto ${_f}
+ !endif
+ !undef _f=${_f}
+ !ifdef _t= ; If we made our own true label then place it
+ ${__t}:
+ !endif
+ !undef __t
+ !undef _t=${_t}
+ !macroend
+ !define Cmd `"" Cmd`
+
+ ; Section flag test
+ !macro _SectionFlagIsSet _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ SectionGetFlags `${_b}` $_LOGICLIB_TEMP
+ IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP & `${_a}`
+ !insertmacro _= $_LOGICLIB_TEMP `${_a}` `${_t}` `${_f}`
+ !macroend
+ !define SectionIsSelected `${SF_SELECTED} SectionFlagIsSet`
+ !define SectionIsSubSection `${SF_SUBSEC} SectionFlagIsSet`
+ !define SectionIsSubSectionEnd `${SF_SUBSECEND} SectionFlagIsSet`
+ !define SectionIsSectionGroup `${SF_SECGRP} SectionFlagIsSet`
+ !define SectionIsSectionGroupEnd `${SF_SECGRPEND} SectionFlagIsSet`
+ !define SectionIsBold `${SF_BOLD} SectionFlagIsSet`
+ !define SectionIsReadOnly `${SF_RO} SectionFlagIsSet`
+ !define SectionIsExpanded `${SF_EXPAND} SectionFlagIsSet`
+ !define SectionIsPartiallySelected `${SF_PSELECTED} SectionFlagIsSet`
+
+ !define IfCmd `!insertmacro _IfThen "" Cmd ${|}`
+
+ !macro _If _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !insertmacro _PushLogic
+ !define ${_Logic}If
+ !define ${_Logic}Else _LogicLib_ElseLabel_${LOGICLIB_COUNTER} ; Get a label for the Else
+ !insertmacro _IncreaseCounter
+ !define _c=${_c}
+ !ifdef _c=true ; If is true
+ !insertmacro _${_o} `${_a}` `${_b}` "" ${${_Logic}Else}
+ !else ; If condition is false
+ !insertmacro _${_o} `${_a}` `${_b}` ${${_Logic}Else} ""
+ !endif
+ !undef _c=${_c}
+ !verbose pop
+ !macroend
+ !define If `!insertmacro _If true`
+ !define Unless `!insertmacro _If false`
+ !define IfNot `!insertmacro _If false`
+
+ !macro _And _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use And without a preceding If or IfNot/Unless"
+ !endif
+ !ifndef ${_Logic}Else
+ !error "Cannot use And following an Else"
+ !endif
+ !define _c=${_c}
+ !ifdef _c=true ; If is true
+ !insertmacro _${_o} `${_a}` `${_b}` "" ${${_Logic}Else}
+ !else ; If condition is false
+ !insertmacro _${_o} `${_a}` `${_b}` ${${_Logic}Else} ""
+ !endif
+ !undef _c=${_c}
+ !verbose pop
+ !macroend
+ !define AndIf `!insertmacro _And true`
+ !define AndUnless `!insertmacro _And false`
+ !define AndIfNot `!insertmacro _And false`
+
+ !macro _Or _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use Or without a preceding If or IfNot/Unless"
+ !endif
+ !ifndef ${_Logic}Else
+ !error "Cannot use Or following an Else"
+ !endif
+ !define _label _LogicLib_Label_${LOGICLIB_COUNTER} ; Skip this test as we already
+ !insertmacro _IncreaseCounter
+ Goto ${_label} ; have a successful result
+ ${${_Logic}Else}: ; Place the Else label
+ !undef ${_Logic}Else ; and remove it
+ !define ${_Logic}Else _LogicLib_ElseLabel_${LOGICLIB_COUNTER} ; Get a label for the next Else and perform the new If
+ !insertmacro _IncreaseCounter
+ !define _c=${_c}
+ !ifdef _c=true ; If is true
+ !insertmacro _${_o} `${_a}` `${_b}` "" ${${_Logic}Else}
+ !else ; If condition is false
+ !insertmacro _${_o} `${_a}` `${_b}` ${${_Logic}Else} ""
+ !endif
+ !undef _c=${_c}
+ ${_label}:
+ !undef _label
+ !verbose pop
+ !macroend
+ !define OrIf `!insertmacro _Or true`
+ !define OrUnless `!insertmacro _Or false`
+ !define OrIfNot `!insertmacro _Or false`
+
+ !macro _Else
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use Else without a preceding If or IfNot/Unless"
+ !endif
+ !ifndef ${_Logic}Else
+ !error "Cannot use Else following an Else"
+ !endif
+ !ifndef ${_Logic}EndIf ; First Else for this If?
+ !define ${_Logic}EndIf _LogicLib_EndIfLabel_${LOGICLIB_COUNTER} ; Get a label for the EndIf
+ !insertmacro _IncreaseCounter
+ !endif
+ Goto ${${_Logic}EndIf} ; Go to the EndIf
+ ${${_Logic}Else}: ; Place the Else label
+ !undef ${_Logic}Else ; and remove it
+ !verbose pop
+ !macroend
+ !define Else `!insertmacro _Else`
+
+ !macro _ElseIf _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${Else} ; Perform the Else
+ !define ${_Logic}Else _LogicLib_ElseLabel_${LOGICLIB_COUNTER} ; Get a label for the next Else and perform the new If
+ !insertmacro _IncreaseCounter
+ !define _c=${_c}
+ !ifdef _c=true ; If is true
+ !insertmacro _${_o} `${_a}` `${_b}` "" ${${_Logic}Else}
+ !else ; If condition is false
+ !insertmacro _${_o} `${_a}` `${_b}` ${${_Logic}Else} ""
+ !endif
+ !undef _c=${_c}
+ !verbose pop
+ !macroend
+ !define ElseIf `!insertmacro _ElseIf true`
+ !define ElseUnless `!insertmacro _ElseIf false`
+ !define ElseIfNot `!insertmacro _ElseIf false`
+
+ !macro _EndIf _n
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use End${_n} without a preceding If or IfNot/Unless"
+ !endif
+ !ifdef ${_Logic}Else
+ ${${_Logic}Else}: ; Place the Else label
+ !undef ${_Logic}Else ; and remove it
+ !endif
+ !ifdef ${_Logic}EndIf
+ ${${_Logic}EndIf}: ; Place the EndIf
+ !undef ${_Logic}EndIf ; and remove it
+ !endif
+ !undef ${_Logic}If
+ !insertmacro _PopLogic
+ !verbose pop
+ !macroend
+ !define EndIf `!insertmacro _EndIf If`
+ !define EndUnless `!insertmacro _EndIf Unless`
+
+ !macro _IfThen _a _o _b _t
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${If} `${_a}` `${_o}` `${_b}`
+ ${_t}
+ ${EndIf}
+ !verbose pop
+ !macroend
+ !define IfThen `!insertmacro _IfThen`
+
+ !macro _IfNotThen _a _o _b _t
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${IfNot} `${_a}` `${_o}` `${_b}`
+ ${_t}
+ ${EndIf}
+ !verbose pop
+ !macroend
+ !define IfNotThen `!insertmacro _IfNotThen`
+
+ !macro _ForEach _v _f _t _o _s
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ StrCpy "${_v}" "${_f}" ; Assign the initial value
+ Goto +2 ; Skip the loop expression for the first iteration
+ !define _DoLoopExpression `IntOp "${_v}" "${_v}" "${_o}" "${_s}"` ; Define the loop expression
+ !define _o=${_o}
+ !ifdef _o=+ ; Check the loop expression operator
+ !define __o > ; to determine the correct loop condition
+ !else ifdef _o=-
+ !define __o <
+ !else
+ !error "Unsupported ForEach step operator (must be + or -)"
+ !endif
+ !undef _o=${_o}
+ !insertmacro _Do For false `${_v}` `${__o}` `${_t}` ; Let Do do the rest
+ !undef __o
+ !verbose pop
+ !macroend
+ !define ForEach `!insertmacro _ForEach`
+
+ !macro _For _v _f _t
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${ForEach} `${_v}` `${_f}` `${_t}` + 1 ; Pass on to ForEach
+ !verbose pop
+ !macroend
+ !define For `!insertmacro _For`
+
+ !define ExitFor `!insertmacro _Goto ExitFor For`
+
+ !define Next `!insertmacro _Loop For Next "" "" "" ""`
+
+ !define While `!insertmacro _Do While true`
+
+ !define ExitWhile `!insertmacro _Goto ExitWhile While`
+
+ !define EndWhile `!insertmacro _Loop While EndWhile "" "" "" ""`
+
+ !macro _Do _n _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !insertmacro _PushLogic
+ !define ${_Logic}${_n} _LogicLib_Label_${LOGICLIB_COUNTER} ; Get a label for the start of the loop
+ !insertmacro _IncreaseCounter
+ ${${_Logic}${_n}}:
+ !insertmacro _PushScope Exit${_n} _LogicLib_Label_${LOGICLIB_COUNTER} ; Get a label for the end of the loop
+ !insertmacro _IncreaseCounter
+ !insertmacro _PushScope Break ${_Exit${_n}} ; Break goes to the end of the loop
+ !ifdef _DoLoopExpression
+ ${_DoLoopExpression} ; Special extra parameter for inserting code
+ !undef _DoLoopExpression ; between the Continue label and the loop condition
+ !endif
+ !define _c=${_c}
+ !ifdef _c= ; No starting condition
+ !insertmacro _PushScope Continue _LogicLib_Label_${LOGICLIB_COUNTER} ; Get a label for Continue at the end of the loop
+ !insertmacro _IncreaseCounter
+ !else
+ !insertmacro _PushScope Continue ${${_Logic}${_n}} ; Continue goes to the start of the loop
+ !ifdef _c=true ; If is true
+ !insertmacro _${_o} `${_a}` `${_b}` "" ${_Exit${_n}}
+ !else ; If condition is false
+ !insertmacro _${_o} `${_a}` `${_b}` ${_Exit${_n}} ""
+ !endif
+ !endif
+ !undef _c=${_c}
+ !define ${_Logic}Condition ${_c} ; Remember the condition used
+ !verbose pop
+ !macroend
+ !define Do `!insertmacro _Do Do "" "" "" ""`
+ !define DoWhile `!insertmacro _Do Do true`
+ !define DoUntil `!insertmacro _Do Do false`
+
+ !macro _Goto _n _s
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _${_n}
+ !error "Cannot use ${_n} without a preceding ${_s}"
+ !endif
+ Goto ${_${_n}}
+ !verbose pop
+ !macroend
+ !define ExitDo `!insertmacro _Goto ExitDo Do`
+
+ !macro _Loop _n _e _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}${_n}
+ !error "Cannot use ${_e} without a preceding ${_n}"
+ !endif
+ !define _c=${${_Logic}Condition}
+ !ifdef _c= ; If Do had no condition place the Continue label
+ ${_Continue}:
+ !endif
+ !undef _c=${${_Logic}Condition}
+ !define _c=${_c}
+ !ifdef _c= ; No ending condition
+ Goto ${${_Logic}${_n}}
+ !else ifdef _c=true ; If condition is true
+ !insertmacro _${_o} `${_a}` `${_b}` ${${_Logic}${_n}} ${_Exit${_n}}
+ !else ; If condition is false
+ !insertmacro _${_o} `${_a}` `${_b}` ${_Exit${_n}} ${${_Logic}${_n}}
+ !endif
+ !undef _c=${_c}
+ Goto ${_Continue} ; Just to ensure it is referenced at least once
+ Goto ${_Exit${_n}} ; Just to ensure it is referenced at least once
+ ${_Exit${_n}}: ; Place the loop exit point
+ !undef ${_Logic}Condition
+ !insertmacro _PopScope Continue
+ !insertmacro _PopScope Break
+ !insertmacro _PopScope Exit${_n}
+ !undef ${_Logic}${_n}
+ !insertmacro _PopLogic
+ !verbose pop
+ !macroend
+ !define Loop `!insertmacro _Loop Do Loop "" "" "" ""`
+ !define LoopWhile `!insertmacro _Loop Do LoopWhile true`
+ !define LoopUntil `!insertmacro _Loop Do LoopUntil false`
+
+ !define Continue `!insertmacro _Goto Continue "For or Do or While"`
+ !define Break `!insertmacro _Goto Break "For or Do or While"`
+
+ !macro _Select _a
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !insertmacro _PushLogic
+ !define ${_Logic}Select `${_a}` ; Remember the left hand side of the comparison
+ !verbose pop
+ !macroend
+ !define Select `!insertmacro _Select`
+
+ !macro _Select_CaseElse
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}Select
+ !error "Cannot use Case without a preceding Select"
+ !endif
+ !ifdef ${_Logic}EndSelect ; This is set only after the first case
+ !ifndef ${_Logic}Else
+ !error "Cannot use Case following a CaseElse"
+ !endif
+ Goto ${${_Logic}EndSelect} ; Go to EndSelect (Ends the previous Case)
+ !define /IfNDef _LogicLib_EndSelectLabelUsed_${_Logic}
+ ${${_Logic}Else}: ; Place the Else label
+ !undef ${_Logic}Else ; and remove it
+ !else
+ !define ${_Logic}EndSelect _LogicLib_EndSelectLabel_${LOGICLIB_COUNTER} ; Get a label for the EndSelect
+ !insertmacro _IncreaseCounter
+ !endif
+ !verbose pop
+ !macroend
+ !define CaseElse `!insertmacro _CaseElse`
+ !define Case_Else `!insertmacro _CaseElse` ; Compatibility with 2.2 and earlier
+ !define Default `!insertmacro _CaseElse` ; For the C-minded
+
+ !macro _Select_Case _a
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${CaseElse} ; Perform the CaseElse
+ !define ${_Logic}Else _LogicLib_NextSelectCaseLabel_${LOGICLIB_COUNTER} ; Get a label for the next Else and perform the new Case
+ !insertmacro _IncreaseCounter
+ !insertmacro _== `${${_Logic}Select}` `${_a}` "" ${${_Logic}Else}
+ !verbose pop
+ !macroend
+ !define Case `!insertmacro _Case`
+
+ !macro _Case2 _a _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${CaseElse} ; Perform the CaseElse
+ !define ${_Logic}Else _LogicLib_NextSelectCaseLabel_${LOGICLIB_COUNTER} ; Get a label for the next Else and perform the new Case
+ !insertmacro _IncreaseCounter
+ !insertmacro _== `${${_Logic}Select}` `${_a}` +2 ""
+ !insertmacro _== `${${_Logic}Select}` `${_b}` "" ${${_Logic}Else}
+ !verbose pop
+ !macroend
+ !define Case2 `!insertmacro _Case2`
+
+ !macro _Case3 _a _b _c
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${CaseElse} ; Perform the CaseElse
+ !define ${_Logic}Else _LogicLib_NextSelectCaseLabel_${LOGICLIB_COUNTER} ; Get a label for the next Else and perform the new Case
+ !insertmacro _IncreaseCounter
+ !insertmacro _== `${${_Logic}Select}` `${_a}` +3 ""
+ !insertmacro _== `${${_Logic}Select}` `${_b}` +2 ""
+ !insertmacro _== `${${_Logic}Select}` `${_c}` "" ${${_Logic}Else}
+ !verbose pop
+ !macroend
+ !define Case3 `!insertmacro _Case3`
+
+ !macro _Case4 _a _b _c _d
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${CaseElse} ; Perform the CaseElse
+ !define ${_Logic}Else _LogicLib_NextSelectCaseLabel_${LOGICLIB_COUNTER} ; Get a label for the next Else and perform the new Case
+ !insertmacro _IncreaseCounter
+ !insertmacro _== `${${_Logic}Select}` `${_a}` +4 ""
+ !insertmacro _== `${${_Logic}Select}` `${_b}` +3 ""
+ !insertmacro _== `${${_Logic}Select}` `${_c}` +2 ""
+ !insertmacro _== `${${_Logic}Select}` `${_d}` "" ${${_Logic}Else}
+ !verbose pop
+ !macroend
+ !define Case4 `!insertmacro _Case4`
+
+ !macro _Case5 _a _b _c _d _e
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ ${CaseElse} ; Perform the CaseElse
+ !define ${_Logic}Else _LogicLib_NextSelectCaseLabel_${LOGICLIB_COUNTER} ; Get a label for the next Else and perform the new Case
+ !insertmacro _IncreaseCounter
+ !insertmacro _== `${${_Logic}Select}` `${_a}` +5 ""
+ !insertmacro _== `${${_Logic}Select}` `${_b}` +4 ""
+ !insertmacro _== `${${_Logic}Select}` `${_c}` +3 ""
+ !insertmacro _== `${${_Logic}Select}` `${_d}` +2 ""
+ !insertmacro _== `${${_Logic}Select}` `${_e}` "" ${${_Logic}Else}
+ !verbose pop
+ !macroend
+ !define Case5 `!insertmacro _Case5`
+
+ !macro _EndSelect
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}Select
+ !error "Cannot use EndSelect without a preceding Select"
+ !endif
+ !ifdef ${_Logic}Else
+ ${${_Logic}Else}: ; Place the Else label
+ !undef ${_Logic}Else ; and remove it
+ !endif
+ !ifdef ${_Logic}EndSelect ; This won't be set if there weren't any cases
+ !ifdef _LogicLib_EndSelectLabelUsed_${_Logic} ; There is no jump to ${${_Logic}EndSelect}: if there is only one Case
+ ${${_Logic}EndSelect}: ; Place the EndSelect
+ !undef _LogicLib_EndSelectLabelUsed_${_Logic}
+ !endif
+ !undef ${_Logic}EndSelect ; and remove it
+ !endif
+ !undef ${_Logic}Select
+ !insertmacro _PopLogic
+ !verbose pop
+ !macroend
+ !define EndSelect `!insertmacro _EndSelect`
+
+ !macro _Switch _a
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !insertmacro _PushLogic
+ !insertmacro _PushScope Switch ${_Logic} ; Keep a separate stack for switch data
+ !insertmacro _PushScope Break _LogicLib_Label_${LOGICLIB_COUNTER} ; Get a lable for beyond the end of the switch
+ !insertmacro _IncreaseCounter
+ !define ${_Switch}Var `${_a}` ; Remember the left hand side of the comparison
+ !tempfile ${_Switch}Tmp ; Create a temporary file
+ !define ${_Logic}Switch _LogicLib_Label_${LOGICLIB_COUNTER} ; Get a label for the end of the switch
+ !insertmacro _IncreaseCounter
+ Goto ${${_Logic}Switch} ; and go there
+ !verbose pop
+ !macroend
+ !define Switch `!insertmacro _Switch`
+
+ !macro _Case _a
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifdef _Logic & ${_Logic}Select ; Check for an active Select
+ !insertmacro _Select_Case `${_a}`
+ !else ifndef _Switch ; If not then check for an active Switch
+ !error "Cannot use Case without a preceding Select or Switch"
+ !else
+ !define _label _LogicLib_Label_${LOGICLIB_COUNTER} ; Get a label for this case,
+ !insertmacro _IncreaseCounter
+ ${_label}: ; place it and add it's check to the temp file
+ !appendfile "${${_Switch}Tmp}" `!insertmacro _== $\`${${_Switch}Var}$\` $\`${_a}$\` ${_label} ""$\n`
+ !undef _label
+ !endif
+ !verbose pop
+ !macroend
+
+ !macro _CaseElse
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifdef _Logic & ${_Logic}Select ; Check for an active Select
+ !insertmacro _Select_CaseElse
+ !else ifndef _Switch ; If not then check for an active Switch
+ !error "Cannot use Case without a preceding Select or Switch"
+ !else ifdef ${_Switch}Else ; Already had a default case?
+ !error "Cannot use CaseElse following a CaseElse"
+ !else
+ !define ${_Switch}Else _LogicLib_Label_${LOGICLIB_COUNTER} ; Get a label for the default case,
+ !insertmacro _IncreaseCounter
+ ${${_Switch}Else}: ; and place it
+ !endif
+ !verbose pop
+ !macroend
+
+ !macro _EndSwitch
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}Switch
+ !error "Cannot use EndSwitch without a preceding Switch"
+ !endif
+ Goto ${_Break} ; Skip the jump table
+ ${${_Logic}Switch}: ; Place the end of the switch
+ !undef ${_Logic}Switch
+ !include "${${_Switch}Tmp}" ; Include the jump table
+ !delfile "${${_Switch}Tmp}" ; and clear it up
+ !ifdef ${_Switch}Else ; Was there a default case?
+ Goto ${${_Switch}Else} ; then go there if all else fails
+ !undef ${_Switch}Else
+ !endif
+ !undef ${_Switch}Tmp
+ !undef ${_Switch}Var
+ ${_Break}: ; Place the break label
+ !insertmacro _PopScope Break
+ !insertmacro _PopScope Switch
+ !insertmacro _PopLogic
+ !verbose pop
+ !macroend
+ !define EndSwitch `!insertmacro _EndSwitch`
+
+!endif ; LOGICLIB
+!verbose 3
+!define LOGICLIB_VERBOSITY ${_LOGICLIB_VERBOSITY}
+!undef _LOGICLIB_VERBOSITY
+!verbose pop
diff --git a/KattekerCreator/nsis/Include/MUI.nsh b/KattekerCreator/nsis/Include/MUI.nsh
new file mode 100644
index 0000000..c2b2a71
--- /dev/null
+++ b/KattekerCreator/nsis/Include/MUI.nsh
@@ -0,0 +1 @@
+!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/MUI2.nsh b/KattekerCreator/nsis/Include/MUI2.nsh
new file mode 100644
index 0000000..0e76adb
--- /dev/null
+++ b/KattekerCreator/nsis/Include/MUI2.nsh
@@ -0,0 +1 @@
+!include "${NSISDIR}\Contrib\Modern UI 2\MUI2.nsh"
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/Memento.nsh b/KattekerCreator/nsis/Include/Memento.nsh
new file mode 100644
index 0000000..6aa1843
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Memento.nsh
@@ -0,0 +1,526 @@
+!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"
+
+
+#####################################
+### Internal Defines ###
+#####################################
+
+!define __MementoSectionIndex 1
+
+#####################################
+### Internal Macros ###
+#####################################
+
+!macro __MementoCheckSettings
+
+ !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
+
+!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
+ ReadRegDWORD $0 ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__MementoSectionLastSectionId}`
+
+ ${If} ${Errors}
+
+ !insertmacro SetSectionFlag `${${__MementoSectionLastSectionId}}` ${SF_BOLD}
+
+ ${EndIf}
+
+ GetFunctionAddress $0 __MementoSectionMarkNew${__MementoSectionIndexNext}
+ Goto $0
+
+ FunctionEnd
+
+ Function __MementoSectionRestoreStatus${__MementoSectionIndex}
+
+ ClearErrors
+ ReadRegDWORD $0 ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__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}}`
+
+ WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__MementoSectionLastSectionId}` 1
+
+ ${Else}
+
+ WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__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
+
+ ReadRegStr $0 ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` MementoSectionUsed
+
+ ${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
+
+ WriteRegStr ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` MementoSectionUsed ""
+
+ Call __MementoSectionSaveStatus1
+
+ Pop $0
+
+ !verbose pop
+
+!macroend
+
+
+
+!endif # ___MEMENTO_NSH___
+
+!verbose pop
diff --git a/KattekerCreator/nsis/Include/MultiUser.nsh b/KattekerCreator/nsis/Include/MultiUser.nsh
new file mode 100644
index 0000000..833ac78
--- /dev/null
+++ b/KattekerCreator/nsis/Include/MultiUser.nsh
@@ -0,0 +1,486 @@
+/*
+
+MultiUser.nsh
+
+Installer configuration for multi-user Windows environments
+
+Copyright 2008-2018 Joost Verburg
+
+*/
+
+!ifndef MULTIUSER_INCLUDED
+!define MULTIUSER_INCLUDED
+!verbose push
+!verbose 3
+
+;Standard NSIS header files
+
+!ifdef MULTIUSER_MUI
+ !include MUI2.nsh
+!endif
+!include nsDialogs.nsh
+!include LogicLib.nsh
+!include WinVer.nsh
+!include FileFunc.nsh
+
+;Variables
+
+Var MultiUser.Privileges
+Var MultiUser.InstallMode
+
+;Command line installation mode setting
+
+!ifdef MULTIUSER_INSTALLMODE_COMMANDLINE
+ !include StrFunc.nsh
+ !ifndef StrStr_INCLUDED
+ ${StrStr}
+ !endif
+ !ifndef MULTIUSER_NOUNINSTALL
+ !ifndef UnStrStr_INCLUDED
+ ${UnStrStr}
+ !endif
+ !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} ${IsNT}
+
+ StrCpy $MultiUser.InstallMode CurrentUser
+
+ SetShellVarContext current
+
+ !if "${UNINSTALLER_PREFIX}" != UN
+ ;Set default installation location for installer
+ !ifdef MULTIUSER_INSTALLMODE_INSTDIR
+ ${if} ${AtLeastWin2000}
+ StrCpy $INSTDIR "$LOCALAPPDATA\${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 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
+
+ ${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}FUCTIONQUIT}
+ !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
+
+ !ifndef MULTIUSER_INIT_TEXT_ADMINREQUIRED
+ !define MULTIUSER_INIT_TEXT_ADMINREQUIRED "${MULTIUSER_TMPSTR_CAPTION} requires administrator privileges."
+ !endif
+
+ !ifndef MULTIUSER_INIT_TEXT_POWERREQUIRED
+ !define MULTIUSER_INIT_TEXT_POWERREQUIRED "${MULTIUSER_TMPSTR_CAPTION} requires at least Power User privileges."
+ !endif
+
+ !ifndef MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE
+ !define MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE "Your user account does not have sufficient privileges to install $(^Name) for all users of this computer."
+ !endif
+
+ !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} ${IsNT}
+
+ ;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}"
+ ${endif}
+ ${endif}
+
+ !endif
+
+ !if ${NSIS_PTR_SIZE} <= 4
+ ${else}
+
+ ;Not running Windows NT, per-user installation not supported
+ Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
+
+ !endif
+ ${endif}
+
+!macroend
+
+!macro MULTIUSER_INIT
+ !verbose push
+ !verbose 3
+
+ !insertmacro MULTIUSER_INIT_CHECKS "" ""
+
+ !verbose pop
+!macroend
+
+!ifndef MULTIUSER_NOUNINSTALL
+
+!macro MULTIUSER_UNINIT
+ !verbose push
+ !verbose 3
+
+ !insertmacro MULTIUSER_INIT_CHECKS Un un.
+
+ !verbose pop
+!macroend
+
+!endif
+
+/*
+
+Modern UI 2 page
+
+*/
+
+!ifdef MULTIUSER_MUI
+
+!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
+
+ Var MultiUser.InstallModePage.ReturnValue
+ !endif
+
+!macroend
+
+!macro MULTIUSER_PAGEDECLARATION_INSTALLMODE
+
+ !insertmacro MUI_SET MULTIUSER_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLMODEPAGE ""
+ !insertmacro MULTIUSER_INSTALLMODEPAGE_INTERFACE
+
+ !insertmacro MUI_DEFAULT MULTIUSER_INSTALLMODEPAGE_TEXT_TOP "$(MULTIUSER_INNERTEXT_INSTALLMODE_TOP)"
+ !insertmacro MUI_DEFAULT MULTIUSER_INSTALLMODEPAGE_TEXT_ALLUSERS "$(MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS)"
+ !insertmacro MUI_DEFAULT MULTIUSER_INSTALLMODEPAGE_TEXT_CURRENTUSER "$(MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER)"
+
+ PageEx custom
+
+ PageCallbacks MultiUser.InstallModePre_${MUI_UNIQUEID} MultiUser.InstallModeLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ PageExEnd
+
+ !insertmacro MULTIUSER_FUNCTION_INSTALLMODEPAGE MultiUser.InstallModePre_${MUI_UNIQUEID} MultiUser.InstallModeLeave_${MUI_UNIQUEID}
+
+ !undef MULTIUSER_INSTALLMODEPAGE_TEXT_TOP
+ !undef MULTIUSER_INSTALLMODEPAGE_TEXT_ALLUSERS
+ !undef MULTIUSER_INSTALLMODEPAGE_TEXT_CURRENTUSER
+
+!macroend
+
+!macro MULTIUSER_PAGE_INSTALLMODE
+
+ ;Modern UI page for install mode
+
+ !verbose push
+ !verbose 3
+
+ !ifndef MULTIUSER_EXECUTIONLEVEL_ALLUSERS
+ !error "A mixed-mode installation requires MULTIUSER_EXECUTIONLEVEL to be set to Admin, Power or Highest."
+ !endif
+
+ !insertmacro MUI_PAGE_INIT
+ !insertmacro MULTIUSER_PAGEDECLARATION_INSTALLMODE
+
+ !verbose pop
+
+!macroend
+
+!macro MULTIUSER_FUNCTION_INSTALLMODEPAGE PRE LEAVE
+
+ ;Page functions of Modern UI page
+
+ Function "${PRE}"
+
+ ${ifnot} ${IsNT}
+ Abort
+ ${endif}
+
+ ${if} $MultiUser.Privileges != "Power"
+ ${andif} $MultiUser.Privileges != "Admin"
+ Abort
+ ${endif}
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MULTIUSER_TEXT_INSTALLMODE_TITLE) $(MULTIUSER_TEXT_INSTALLMODE_SUBTITLE)
+
+ nsDialogs::Create 1018
+ Pop $MultiUser.InstallModePage
+
+ ${NSD_CreateLabel} 0u 0u 300u 40u "${MULTIUSER_INSTALLMODEPAGE_TEXT_TOP}"
+ Pop $MultiUser.InstallModePage.Text
+
+ ${NSD_CreateRadioButton} 20u 50u 280u 10u "${MULTIUSER_INSTALLMODEPAGE_TEXT_ALLUSERS}"
+ Pop $MultiUser.InstallModePage.AllUsers
+
+ ${NSD_CreateRadioButton} 20u 70u 280u 10u "${MULTIUSER_INSTALLMODEPAGE_TEXT_CURRENTUSER}"
+ 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 MUI_PAGE_FUNCTION_CUSTOM SHOW
+ nsDialogs::Show
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM DESTROYED
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+ SendMessage $MultiUser.InstallModePage.AllUsers ${BM_GETCHECK} 0 0 $MultiUser.InstallModePage.ReturnValue
+
+ ${if} $MultiUser.InstallModePage.ReturnValue = ${BST_CHECKED}
+ Call MultiUser.InstallMode.AllUsers
+ ${else}
+ Call MultiUser.InstallMode.CurrentUser
+ ${endif}
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+ FunctionEnd
+
+!macroend
+
+!endif
+
+!verbose pop
+!endif
diff --git a/KattekerCreator/nsis/Include/Sections.nsh b/KattekerCreator/nsis/Include/Sections.nsh
new file mode 100644
index 0000000..633c4c7
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Sections.nsh
@@ -0,0 +1,310 @@
+; Sections.nsh
+;
+; Defines and macros for section control
+;
+; Include in your script using:
+; !include "Sections.nsh"
+
+;--------------------------------
+
+!ifndef SECTIONS_INCLUDED
+
+!define SECTIONS_INCLUDED
+
+;--------------------------------
+
+; Generic section defines
+
+# section or section group is selected
+!define SF_SELECTED 1
+# section group
+!define SF_SECGRP 2
+!define SF_SUBSEC 2 # deprecated
+# section group end marker
+!define SF_SECGRPEND 4
+!define SF_SUBSECEND 4 # deprecated
+# bold text (Section !blah)
+!define SF_BOLD 8
+# read only (SectionIn RO)
+!define SF_RO 16
+# expanded section group (SectionGroup /e blah)
+!define SF_EXPAND 32
+# section group is partially selected
+!define SF_PSELECTED 64 # internal
+# internal
+!define SF_TOGGLED 128 # internal
+!define SF_NAMECHG 256 # internal
+
+# mask to toggle off the selected flag
+!define SECTION_OFF 0xFFFFFFFE
+
+;--------------------------------
+
+; Select / unselect / reserve section
+
+!macro SelectSection SECTION
+
+ Push $0
+ Push $1
+ StrCpy $1 "${SECTION}"
+ SectionGetFlags $1 $0
+ IntOp $0 $0 | ${SF_SELECTED}
+ SectionSetFlags $1 $0
+ Pop $1
+ Pop $0
+
+!macroend
+
+!macro UnselectSection SECTION
+
+ Push $0
+ Push $1
+ StrCpy $1 "${SECTION}"
+ SectionGetFlags $1 $0
+ IntOp $0 $0 & ${SECTION_OFF}
+ SectionSetFlags $1 $0
+ Pop $1
+ Pop $0
+
+!macroend
+
+; If section selected, will unselect, if unselected, will select
+
+!macro ReverseSection SECTION
+
+ Push $0
+ Push $1
+ StrCpy $1 "${SECTION}"
+ SectionGetFlags $1 $0
+ IntOp $0 $0 ^ ${SF_SELECTED}
+ SectionSetFlags $1 $0
+ Pop $1
+ Pop $0
+
+!macroend
+
+;--------------------------------
+
+; Macros for mutually exclusive section selection
+; Written by Tim Gallagher
+;
+; See one-section.nsi for an example of usage
+
+; Starts the Radio Button Block
+; You should pass a variable that keeps the selected section
+; as the first parameter for this macro. This variable should
+; be initialized to the default section's index.
+;
+; As this macro uses $R0 and $R1 you can't use those two as the
+; varible which will keep the selected section.
+
+!macro StartRadioButtons var
+
+ !define StartRadioButtons_Var "${var}"
+
+ Push $R0
+
+ SectionGetFlags "${StartRadioButtons_Var}" $R0
+ IntOp $R0 $R0 & ${SECTION_OFF}
+ SectionSetFlags "${StartRadioButtons_Var}" $R0
+
+ Push $R1
+
+ StrCpy $R1 "${StartRadioButtons_Var}"
+
+!macroend
+
+; A radio button
+
+!macro RadioButton SECTION_NAME
+
+ SectionGetFlags ${SECTION_NAME} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} 0 +2 +2
+ StrCpy "${StartRadioButtons_Var}" ${SECTION_NAME}
+
+!macroend
+
+; Ends the radio button block
+
+!macro EndRadioButtons
+
+ StrCmp $R1 "${StartRadioButtons_Var}" 0 +4 ; selection hasn't changed
+ SectionGetFlags "${StartRadioButtons_Var}" $R0
+ IntOp $R0 $R0 | ${SF_SELECTED}
+ SectionSetFlags "${StartRadioButtons_Var}" $R0
+
+ Pop $R1
+ Pop $R0
+
+ !undef StartRadioButtons_Var
+
+!macroend
+
+;--------------------------------
+
+; These are two macros you can use to set a Section in an InstType
+; or clear it from an InstType.
+;
+; Written by Robert Kehl
+;
+; For details, see http://nsis.sourceforge.net/wiki/SetSectionInInstType%2C_ClearSectionInInstType
+;
+; Use the defines below for the WANTED_INSTTYPE parameter.
+
+!define INSTTYPE_1 1
+!define INSTTYPE_2 2
+!define INSTTYPE_3 4
+!define INSTTYPE_4 8
+!define INSTTYPE_5 16
+!define INSTTYPE_6 32
+!define INSTTYPE_7 64
+!define INSTTYPE_8 128
+!define INSTTYPE_9 256
+!define INSTTYPE_10 512
+!define INSTTYPE_11 1024
+!define INSTTYPE_12 2048
+!define INSTTYPE_13 4096
+!define INSTTYPE_14 8192
+!define INSTTYPE_15 16384
+!define INSTTYPE_16 32768
+!define INSTTYPE_17 65536
+!define INSTTYPE_18 131072
+!define INSTTYPE_19 262144
+!define INSTTYPE_20 524288
+!define INSTTYPE_21 1048576
+!define INSTTYPE_22 2097152
+!define INSTTYPE_23 4194304
+!define INSTTYPE_24 8388608
+!define INSTTYPE_25 16777216
+!define INSTTYPE_26 33554432
+!define INSTTYPE_27 67108864
+!define INSTTYPE_28 134217728
+!define INSTTYPE_29 268435456
+!define INSTTYPE_30 536870912
+!define INSTTYPE_31 1073741824
+!define INSTTYPE_32 2147483648
+
+!macro SetSectionInInstType SECTION_NAME WANTED_INSTTYPE
+
+ Push $0
+ Push $1
+ StrCpy $1 "${SECTION_NAME}"
+ SectionGetInstTypes $1 $0
+ IntOp $0 $0 | ${WANTED_INSTTYPE}
+ SectionSetInstTypes $1 $0
+ Pop $1
+ Pop $0
+
+!macroend
+
+!macro ClearSectionInInstType SECTION_NAME WANTED_INSTTYPE
+
+ Push $0
+ Push $1
+ Push $2
+ StrCpy $2 "${SECTION_NAME}"
+ SectionGetInstTypes $2 $0
+ StrCpy $1 ${WANTED_INSTTYPE}
+ IntOp $1 $1 ~
+ IntOp $0 $0 & $1
+ SectionSetInstTypes $2 $0
+ Pop $2
+ Pop $1
+ Pop $0
+
+!macroend
+
+;--------------------------------
+
+; Set / clear / check bits in a section's flags
+; Written by derekrprice
+
+; Set one or more bits in a sections's flags
+
+!macro SetSectionFlag SECTION BITS
+
+ Push $R0
+ Push $R1
+ StrCpy $R1 "${SECTION}"
+ SectionGetFlags $R1 $R0
+ IntOp $R0 $R0 | "${BITS}"
+ SectionSetFlags $R1 $R0
+ Pop $R1
+ Pop $R0
+
+!macroend
+
+; Clear one or more bits in section's flags
+
+!macro ClearSectionFlag SECTION BITS
+
+ Push $R0
+ Push $R1
+ Push $R2
+ StrCpy $R2 "${SECTION}"
+ SectionGetFlags $R2 $R0
+ IntOp $R1 "${BITS}" ~
+ IntOp $R0 $R0 & $R1
+ SectionSetFlags $R2 $R0
+ Pop $R2
+ Pop $R1
+ Pop $R0
+
+!macroend
+
+; Check if one or more bits in section's flags are set
+; If they are, jump to JUMPIFSET
+; If not, jump to JUMPIFNOTSET
+
+!macro SectionFlagIsSet SECTION BITS JUMPIFSET JUMPIFNOTSET
+ Push $R0
+ SectionGetFlags "${SECTION}" $R0
+ IntOp $R0 $R0 & "${BITS}"
+ IntCmp $R0 "${BITS}" +3
+ Pop $R0
+ StrCmp "" "${JUMPIFNOTSET}" +3 "${JUMPIFNOTSET}"
+ Pop $R0
+ Goto "${JUMPIFSET}"
+!macroend
+
+;--------------------------------
+
+; Removes a section by unselecting and hiding it
+
+!macro RemoveSection SECTION
+
+ Push $R0
+ Push $R1
+ StrCpy $R1 `${SECTION}`
+ SectionGetFlags $R1 $R0
+ IntOp $R0 $R0 & ${SECTION_OFF}
+ SectionSetFlags $R1 $R0
+ SectionSetText $R1 ``
+ Pop $R1
+ Pop $R0
+
+!macroend
+
+; Undoes the RemoveSection action
+
+!macro UnremoveSection SECTION SECTION_TEXT
+
+ Push $R0
+ Push $R1
+ Push $R2
+ StrCpy $R1 `${SECTION}`
+ StrCpy $R2 `${SECTION_TEXT}`
+ SectionGetFlags $R1 $R0
+ IntOp $R0 $R0 | ${SF_SELECTED}
+ SectionSetFlags $R1 $R0
+ SectionSetText $R1 $R2
+ Pop $R2
+ Pop $R1
+ Pop $R0
+
+!macroend
+
+;--------------------------------
+
+!endif
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/StrFunc.nsh b/KattekerCreator/nsis/Include/StrFunc.nsh
new file mode 100644
index 0000000..433118f
--- /dev/null
+++ b/KattekerCreator/nsis/Include/StrFunc.nsh
@@ -0,0 +1,1760 @@
+/*
+o-----------------------------------------------------------------------------o
+|String Functions Header File 1.09 |
+(-----------------------------------------------------------------------------)
+| By deguix / A Header file for NSIS 2.01 |
+| -------------------------------|
+| |
+| This header file contains NSIS functions for string manipulation. |
+o-----------------------------------------------------------------------------o
+*/
+
+!verbose push 3
+!define /IfNDef STRFUNC_VERBOSITY 3
+!define /IfNDef _STRFUNC_VERBOSITY ${STRFUNC_VERBOSITY}
+!define /IfNDef _STRFUNC_CREDITVERBOSITY ${STRFUNC_VERBOSITY}
+!undef STRFUNC_VERBOSITY
+!verbose ${_STRFUNC_VERBOSITY}
+
+!include LogicLib.nsh
+
+!ifndef STRFUNC
+
+ !define /IfNDef FALSE 0
+ !define /IfNDef TRUE 1
+
+ ;Header File Identification
+
+ !define STRFUNC `String Functions Header File`
+ !define STRFUNC_SHORT `StrFunc`
+ !define STRFUNC_CREDITS `2004 Diego Pedroso`
+
+ ;Header File Version
+
+ !define STRFUNC_VERMAJ 1
+ !define STRFUNC_VERMED 09
+ ;!define STRFUNC_VERMIN 0
+ ;!define STRFUNC_VERBLD 0
+
+ !define STRFUNC_VER `${STRFUNC_VERMAJ}.${STRFUNC_VERMED}`
+
+ ;Header File Init Message Prefix and Postfix
+
+ !define STRFUNC_INITMSGPRE `----------------------------------------------------------------------$\r$\n`
+ !define STRFUNC_INITMSGPOST `$\r$\n----------------------------------------------------------------------$\r$\n`
+
+ ;Header File Init Message
+
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `${STRFUNC_INITMSGPRE}NSIS ${STRFUNC} ${STRFUNC_VER} - Copyright ${STRFUNC_CREDITS}${STRFUNC_INITMSGPOST}`
+ !verbose pop
+
+ ;Header File Function Init Message Prefix and Postfix
+
+ !define STRFUNC_FUNCMSGPRE ``
+ !define STRFUNC_FUNCMSGPOST ``
+
+ ;Header File Function Macros
+
+ !macro STRFUNC_FUNCLIST_INSERT Name
+ !ifdef StrFunc_List
+ !define StrFunc_List2 `${StrFunc_List}`
+ !undef StrFunc_List
+ !define StrFunc_List `${StrFunc_List2}|${Name}`
+ !undef StrFunc_List2
+ !else
+ !define StrFunc_List `${Name}`
+ !endif
+ !macroend
+
+ !macro STRFUNC_DEFFUNC Name
+ !insertmacro STRFUNC_FUNCLIST_INSERT ${Name}
+
+ !define `${Name}` `!insertmacro FUNCTION_STRING_${Name}`
+ !define `Un${Name}` `!insertmacro FUNCTION_STRING_Un${Name}`
+ !macroend
+
+ !macro STRFUNC_FUNC ShortName Credits
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+
+ !ifndef `Un${ShortName}`
+ !echo `${STRFUNC_FUNCMSGPRE}$ {Un${ShortName}} - Copyright ${Credits}${STRFUNC_FUNCMSGPOST}`
+ !verbose pop
+ !define `Un${ShortName}` `!insertmacro FUNCTION_STRING_Un${ShortName}_Call`
+ !define `Un${ShortName}_INCLUDED`
+ Function `un.${ShortName}`
+ !else
+ !echo `${STRFUNC_FUNCMSGPRE}$ {${ShortName}} - Copyright ${Credits}${STRFUNC_FUNCMSGPOST}`
+ !verbose pop
+ !undef `${ShortName}`
+ !define `${ShortName}` `!insertmacro FUNCTION_STRING_${ShortName}_Call`
+ !define `${ShortName}_INCLUDED`
+ Function `${ShortName}`
+ !endif
+ !macroend
+
+ ;Function Names Startup Definition
+
+ !insertmacro STRFUNC_DEFFUNC StrCase
+ !define StrCase_List `ResultVar|String|Type`
+ !define StrCase_TypeList `Output|Text|Option U L T S <>`
+ !macro `FUNCTION_STRING_UnStrCase`
+ !undef UnStrCase
+ !insertmacro FUNCTION_STRING_StrCase
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrClb
+ !define StrClb_List `ResultVar|String|Action`
+ !define StrClb_TypeList `Output|Text|Option > < <>`
+ !macro `FUNCTION_STRING_UnStrClb`
+ !undef UnStrClb
+ !insertmacro FUNCTION_STRING_StrClb
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrIOToNSIS
+ !define StrIOToNSIS_List `ResultVar|String`
+ !define StrIOToNSIS_TypeList `Output|Text`
+ !macro `FUNCTION_STRING_UnStrIOToNSIS`
+ !undef UnStrIOToNSIS
+ !insertmacro FUNCTION_STRING_StrIOToNSIS
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrLoc
+ !define StrLoc_List `ResultVar|String|StrToSearchFor|CounterDirection`
+ !define StrLoc_TypeList `Output|Text|Text|Option > <`
+ !macro `FUNCTION_STRING_UnStrLoc`
+ !undef UnStrLoc
+ !insertmacro FUNCTION_STRING_StrLoc
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrNSISToIO
+ !define StrNSISToIO_List `ResultVar|String`
+ !define StrNSISToIO_TypeList `Output|Text`
+ !macro `FUNCTION_STRING_UnStrNSISToIO`
+ !undef UnStrNSISToIO
+ !insertmacro FUNCTION_STRING_StrNSISToIO
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrRep
+ !define StrRep_List `ResultVar|String|StrToReplace|ReplacementString`
+ !define StrRep_TypeList `Output|Text|Text|Text`
+ !macro `FUNCTION_STRING_UnStrRep`
+ !undef UnStrRep
+ !insertmacro FUNCTION_STRING_StrRep
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrSort
+ !define StrSort_List `ResultVar|String|LeftStr|CenterStr|RightStr|IncludeLeftStr|IncludeCenterStr|IncludeRightStr`
+ !define StrSort_TypeList `Output|Text|Text|Text|Text|Option 1 0|Option 1 0|Option 1 0`
+ !macro `FUNCTION_STRING_UnStrSort`
+ !undef UnStrSort
+ !insertmacro FUNCTION_STRING_StrSort
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrStr
+ !define StrStr_List `ResultVar|String|StrToSearchFor`
+ !define StrStr_TypeList `Output|Text|Text`
+ !macro `FUNCTION_STRING_UnStrStr`
+ !undef UnStrStr
+ !insertmacro FUNCTION_STRING_StrStr
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrStrAdv
+ !define StrStrAdv_List `ResultVar|String|StrToSearchFor|SearchDirection|ResultStrDirection|DisplayStrToSearch|Loops|CaseSensitive`
+ !define StrStrAdv_TypeList `Output|Text|Text|Option > <|Option > <|Option 1 0|Text|Option 0 1`
+ !macro `FUNCTION_STRING_UnStrStrAdv`
+ !undef UnStrStrAdv
+ !insertmacro FUNCTION_STRING_StrStrAdv
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrTok
+ !define StrTok_List `ResultVar|String|Separators|ResultPart|SkipEmptyParts`
+ !define StrTok_TypeList `Output|Text|Text|Mixed L|Option 1 0`
+ !macro `FUNCTION_STRING_UnStrTok`
+ !undef UnStrTok
+ !insertmacro FUNCTION_STRING_StrTok
+ !macroend
+
+ !insertmacro STRFUNC_DEFFUNC StrTrimNewLines
+ !define StrTrimNewLines_List `ResultVar|String`
+ !define StrTrimNewLines_TypeList `Output|Text`
+ !macro `FUNCTION_STRING_UnStrTrimNewLines`
+ !undef UnStrTrimNewLines
+ !insertmacro FUNCTION_STRING_StrTrimNewLines
+ !macroend
+
+ ;Function Codes for Install and Uninstall
+
+ # Function StrCase
+ ################
+
+ !macro FUNCTION_STRING_StrCase
+ !insertmacro STRFUNC_FUNC `StrCase` `2004 Diego Pedroso - Based on functions by Dave Laundon`
+
+ /*After this point:
+ ------------------------------------------
+ $0 = String (input)
+ $1 = Type (input)
+ $2 = StrLength (temp)
+ $3 = StartChar (temp)
+ $4 = EndChar (temp)
+ $5 = ResultStr (temp)
+ $6 = CurrentChar (temp)
+ $7 = LastChar (temp)
+ $8 = Temp (temp)*/
+
+ ;Get input from user
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+
+ ;Initialize variables
+ StrCpy $2 ""
+ StrCpy $3 ""
+ StrCpy $4 ""
+ StrCpy $5 ""
+ StrCpy $6 ""
+ StrCpy $7 ""
+ StrCpy $8 ""
+
+ ;Upper and lower cases are simple to use
+ ${If} $1 == "U"
+
+ ;Upper Case System:
+ ;------------------
+ ; Convert all characters to upper case.
+
+ System::Call "User32::CharUpper(t r0 r5)i"
+ Goto StrCase_End
+ ${ElseIf} $1 == "L"
+
+ ;Lower Case System:
+ ;------------------
+ ; Convert all characters to lower case.
+
+ System::Call "User32::CharLower(t r0 r5)i"
+ Goto StrCase_End
+ ${EndIf}
+
+ ;For the rest of cases:
+ ;Get "String" length
+ StrLen $2 $0
+
+ ;Make a loop until the end of "String"
+ ${For} $3 0 $2
+ ;Add 1 to "EndChar" counter also
+ IntOp $4 $3 + 1
+
+ # Step 1: Detect one character at a time
+
+ ;Remove characters before "StartChar" except when
+ ;"StartChar" is the first character of "String"
+ ${If} $3 <> 0
+ StrCpy $6 $0 `` $3
+ ${EndIf}
+
+ ;Remove characters after "EndChar" except when
+ ;"EndChar" is the last character of "String"
+ ${If} $4 <> $2
+ ${If} $3 = 0
+ StrCpy $6 $0 1
+ ${Else}
+ StrCpy $6 $6 1
+ ${EndIf}
+ ${EndIf}
+
+ # Step 2: Convert to the advanced case user chose:
+
+ ${If} $1 == "T"
+
+ ;Title Case System:
+ ;------------------
+ ; Convert all characters after a non-alphabetic character to upper case.
+ ; Else convert to lower case.
+
+ ;Use "IsCharAlpha" for the job
+ System::Call "*(&t1 r7) p .r8"
+ System::Call "*$8(&i1 .r7)"
+ System::Free $8
+ System::Call "user32::IsCharAlpha(i r7) i .r8"
+
+ ;Verify "IsCharAlpha" result and convert the character
+ ${If} $8 = 0
+ System::Call "User32::CharUpper(t r6 r6)i"
+ ${Else}
+ System::Call "User32::CharLower(t r6 r6)i"
+ ${EndIf}
+ ${ElseIf} $1 == "S"
+
+ ;Sentence Case System:
+ ;------------------
+ ; Convert all characters after a ".", "!" or "?" character to upper case.
+ ; Else convert to lower case. Spaces or tabs after these marks are ignored.
+
+ ;Detect current characters and ignore if necessary
+ ${If} $6 == " "
+ ${OrIf} $6 == "$\t"
+ Goto IgnoreLetter
+ ${EndIf}
+
+ ;Detect last characters and convert
+ ${If} $7 == "."
+ ${OrIf} $7 == "!"
+ ${OrIf} $7 == "?"
+ ${OrIf} $7 == ""
+ System::Call "User32::CharUpper(t r6 r6)i"
+ ${Else}
+ System::Call "User32::CharLower(t r6 r6)i"
+ ${EndIf}
+ ${ElseIf} $1 == "<>"
+
+ ;Switch Case System:
+ ;------------------
+ ; Switch all characters cases to their inverse case.
+
+ ;Use "IsCharUpper" for the job
+ System::Call "*(&t1 r6) p .r8"
+ System::Call "*$8(&i1 .r7)"
+ System::Free $8
+ System::Call "user32::IsCharUpper(i r7) i .r8"
+
+ ;Verify "IsCharUpper" result and convert the character
+ ${If} $8 = 0
+ System::Call "User32::CharUpper(t r6 r6)i"
+ ${Else}
+ System::Call "User32::CharLower(t r6 r6)i"
+ ${EndIf}
+ ${EndIf}
+
+ ;Write the character to "LastChar"
+ StrCpy $7 $6
+
+ IgnoreLetter:
+ ;Add this character to "ResultStr"
+ StrCpy $5 `$5$6`
+ ${Next}
+
+ StrCase_End:
+
+ /*After this point:
+ ------------------------------------------
+ $0 = OutVar (output)*/
+
+ ; Copy "ResultStr" to "OutVar"
+ StrCpy $0 $5
+
+ ;Return output to user
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !macroend
+
+ !macro FUNCTION_STRING_StrClb
+ !insertmacro STRFUNC_FUNC `StrClb` `2004 Diego Pedroso - Based on functions by Nik Medved`
+
+ /*After this point:
+ ------------------------------------------
+ $0 = String (input)
+ $1 = Action (input)
+ $2 = Lock/Unlock (temp)
+ $3 = Temp (temp)
+ $4 = Temp2 (temp)*/
+
+ ;Get input from user
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+
+ StrCpy $2 ""
+ StrCpy $3 ""
+ StrCpy $4 ""
+
+ ;Open the clipboard to do the operations the user chose (kichik's fix)
+ System::Call 'user32::OpenClipboard(p $HWNDPARENT)'
+
+ ${If} $1 == ">" ;Set
+
+ ;Step 1: Clear the clipboard
+ System::Call 'user32::EmptyClipboard()'
+
+ ;Step 2: Allocate global heap
+ StrLen $2 $0
+ IntOp $2 $2 + 1
+ IntOp $2 $2 * ${NSIS_CHAR_SIZE}
+ System::Call 'kernel32::GlobalAlloc(i 2, i r2) p.r2'
+
+ ;Step 3: Lock the handle
+ System::Call 'kernel32::GlobalLock(p r2) i.r3'
+
+ ;Step 4: Copy the text to locked clipboard buffer
+ System::Call 'kernel32::lstrcpy(p r3, t r0)'
+
+ ;Step 5: Unlock the handle again
+ System::Call 'kernel32::GlobalUnlock(p r2)'
+
+ ;Step 6: Set the information to the clipboard
+ System::Call 'user32::SetClipboardData(i 1, p r2)'
+
+ StrCpy $0 ""
+
+ ${ElseIf} $1 == "<" ;Get
+
+ ;Step 1: Get clipboard data
+ System::Call 'user32::GetClipboardData(i 1) p .r2'
+
+ ;Step 2: Lock and copy data (kichik's fix)
+ System::Call 'kernel32::GlobalLock(p r2) t .r0'
+
+ ;Step 3: Unlock (kichik's fix)
+ System::Call 'kernel32::GlobalUnlock(p r2)'
+
+ ${ElseIf} $1 == "<>" ;Swap
+
+ ;Step 1: Get clipboard data
+ System::Call 'user32::GetClipboardData(i 1) p .r2'
+
+ ;Step 2: Lock and copy data (kichik's fix)
+ System::Call 'kernel32::GlobalLock(p r2) t .r4'
+
+ ;Step 3: Unlock (kichik's fix)
+ System::Call 'kernel32::GlobalUnlock(p r2)'
+
+ ;Step 4: Clear the clipboard
+ System::Call 'user32::EmptyClipboard()'
+
+ ;Step 5: Allocate global heap
+ StrLen $2 $0
+ IntOp $2 $2 + 1
+ IntOp $2 $2 * ${NSIS_CHAR_SIZE}
+ System::Call 'kernel32::GlobalAlloc(i 2, i r2) p.r2'
+
+ ;Step 6: Lock the handle
+ System::Call 'kernel32::GlobalLock(p r2) i.r3'
+
+ ;Step 7: Copy the text to locked clipboard buffer
+ System::Call 'kernel32::lstrcpy(p r3, t r0)'
+
+ ;Step 8: Unlock the handle again
+ System::Call 'kernel32::GlobalUnlock(p r2)'
+
+ ;Step 9: Set the information to the clipboard
+ System::Call 'user32::SetClipboardData(i 1, p r2)'
+
+ StrCpy $0 $4
+ ${Else} ;Clear
+
+ ;Step 1: Clear the clipboard
+ System::Call 'user32::EmptyClipboard()'
+
+ StrCpy $0 ""
+ ${EndIf}
+
+ ;Close the clipboard
+ System::Call 'user32::CloseClipboard()'
+
+ /*After this point:
+ ------------------------------------------
+ $0 = OutVar (output)*/
+
+ ;Return result to user
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !macroend
+
+ # Function StrIOToNSIS
+ ####################
+
+ !macro FUNCTION_STRING_StrIOToNSIS
+ !insertmacro STRFUNC_FUNC `StrIOToNSIS` `2004 "bluenet" - Based on functions by Amir Szekely, Joost Verburg, Dave Laundon and Diego Pedroso`
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = String (input/output)
+ $R1 = StartCharPos (temp)
+ $R2 = StrLen (temp)
+ $R3 = TempStr (temp)
+ $R4 = TempRepStr (temp)*/
+
+ ;Get input from user
+ Exch $R0
+ Push $R1
+ Push $R2
+ Push $R3
+ Push $R4
+
+ ;Get "String" length
+ StrLen $R2 $R0
+
+ ;Loop until "String" end is reached
+ ${For} $R1 0 $R2
+ ;Get the next "String" characters
+ StrCpy $R3 $R0 2 $R1
+
+ ;Detect if current character is:
+ ${If} $R3 == "\\" ;Back-slash
+ StrCpy $R4 "\"
+ ${ElseIf} $R3 == "\r" ;Carriage return
+ StrCpy $R4 "$\r"
+ ${ElseIf} $R3 == "\n" ;Line feed
+ StrCpy $R4 "$\n"
+ ${ElseIf} $R3 == "\t" ;Tab
+ StrCpy $R4 "$\t"
+ ${Else} ;Anything else
+ StrCpy $R4 ""
+ ${EndIf}
+
+ ;Detect if "TempRepStr" is not empty
+ ${If} $R4 != ""
+ ;Replace the old characters with the new one
+ StrCpy $R3 $R0 $R1
+ IntOp $R1 $R1 + 2
+ StrCpy $R0 $R0 "" $R1
+ StrCpy $R0 "$R3$R4$R0"
+ IntOp $R2 $R2 - 1 ;Decrease "StrLen"
+ IntOp $R1 $R1 - 2 ;Go back to the next character
+ ${EndIf}
+ ${Next}
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Exch $R0
+ FunctionEnd
+ !macroend
+
+ # Function StrLoc
+ ###############
+
+ !macro FUNCTION_STRING_StrLoc
+ !insertmacro STRFUNC_FUNC `StrLoc` `2004 Diego Pedroso - Based on functions by Ximon Eighteen`
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = OffsetDirection (input)
+ $R1 = StrToSearch (input)
+ $R2 = String (input)
+ $R3 = StrToSearchLen (temp)
+ $R4 = StrLen (temp)
+ $R5 = StartCharPos (temp)
+ $R6 = TempStr (temp)*/
+
+ ;Get input from user
+ Exch $R0
+ Exch
+ Exch $R1
+ Exch 2
+ Exch $R2
+ Push $R3
+ Push $R4
+ Push $R5
+ Push $R6
+
+ ;Get "String" and "StrToSearch" length
+ StrLen $R3 $R1
+ StrLen $R4 $R2
+ ;Start "StartCharPos" counter
+ StrCpy $R5 0
+
+ ;Loop until "StrToSearch" is found or "String" reaches its end
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $R6 $R2 $R3 $R5
+
+ ;Compare "TempStr" with "StrToSearch"
+ ${If} $R6 == $R1
+ ${If} $R0 == `<`
+ IntOp $R6 $R3 + $R5
+ IntOp $R0 $R4 - $R6
+ ${Else}
+ StrCpy $R0 $R5
+ ${EndIf}
+ ${ExitDo}
+ ${EndIf}
+ ;If not "StrToSearch", this could be "String" end
+ ${If} $R5 >= $R4
+ StrCpy $R0 ``
+ ${ExitDo}
+ ${EndIf}
+ ;If not, continue the loop
+ IntOp $R5 $R5 + 1
+ ${Loop}
+
+ ;Return output to user
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Exch
+ Pop $R1
+ Exch $R0
+ FunctionEnd
+
+ !macroend
+
+ # Function StrNSISToIO
+ ####################
+
+ !macro FUNCTION_STRING_StrNSISToIO
+ !insertmacro STRFUNC_FUNC `StrNSISToIO` `2004 "bluenet" - Based on functions by Amir Szekely, Joost Verburg, Dave Laundon and Diego Pedroso`
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = String (input/output)
+ $R1 = StartCharPos (temp)
+ $R2 = StrLen (temp)
+ $R3 = TempStr (temp)
+ $R4 = TempRepStr (temp)*/
+
+ ;Get input from user
+ Exch $R0
+ Push $R1
+ Push $R2
+ Push $R3
+ Push $R4
+
+ ;Get "String" length
+ StrLen $R2 $R0
+
+ ;Loop until "String" end is reached
+ ${For} $R1 0 $R2
+ ;Get the next "String" character
+ StrCpy $R3 $R0 1 $R1
+
+ ;Detect if current character is:
+ ${If} $R3 == "$\r" ;Back-slash
+ StrCpy $R4 "\r"
+ ${ElseIf} $R3 == "$\n" ;Carriage return
+ StrCpy $R4 "\n"
+ ${ElseIf} $R3 == "$\t" ;Line feed
+ StrCpy $R4 "\t"
+ ${ElseIf} $R3 == "\" ;Tab
+ StrCpy $R4 "\\"
+ ${Else} ;Anything else
+ StrCpy $R4 ""
+ ${EndIf}
+
+ ;Detect if "TempRepStr" is not empty
+ ${If} $R4 != ""
+ ;Replace the old character with the new ones
+ StrCpy $R3 $R0 $R1
+ IntOp $R1 $R1 + 1
+ StrCpy $R0 $R0 "" $R1
+ StrCpy $R0 "$R3$R4$R0"
+ IntOp $R2 $R2 + 1 ;Increase "StrLen"
+ ${EndIf}
+ ${Next}
+
+ ;Return output to user
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Exch $R0
+ FunctionEnd
+ !macroend
+
+ # Function StrRep
+ ###############
+
+ !macro FUNCTION_STRING_StrRep
+ !insertmacro STRFUNC_FUNC `StrRep` `2004 Diego Pedroso - Based on functions by Hendri Adriaens`
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = ReplacementString (input)
+ $R1 = StrToSearch (input)
+ $R2 = String (input)
+ $R3 = RepStrLen (temp)
+ $R4 = StrToSearchLen (temp)
+ $R5 = StrLen (temp)
+ $R6 = StartCharPos (temp)
+ $R7 = TempStrL (temp)
+ $R8 = TempStrR (temp)*/
+
+ ;Get input from user
+ Exch $R0
+ Exch
+ Exch $R1
+ Exch
+ Exch 2
+ Exch $R2
+ Push $R3
+ Push $R4
+ Push $R5
+ Push $R6
+ Push $R7
+ Push $R8
+
+ ;Return "String" if "StrToSearch" is ""
+ ${IfThen} $R1 == "" ${|} Goto Done ${|}
+
+ ;Get "ReplacementString", "String" and "StrToSearch" length
+ StrLen $R3 $R0
+ StrLen $R4 $R1
+ StrLen $R5 $R2
+ ;Start "StartCharPos" counter
+ StrCpy $R6 0
+
+ ;Loop until "StrToSearch" is found or "String" reaches its end
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStrL")
+ StrCpy $R7 $R2 $R4 $R6
+
+ ;Compare "TempStrL" with "StrToSearch"
+ ${If} $R7 == $R1
+ ;Split "String" to replace the string wanted
+ StrCpy $R7 $R2 $R6 ;TempStrL
+
+ ;Calc: "StartCharPos" + "StrToSearchLen" = EndCharPos
+ IntOp $R8 $R6 + $R4
+
+ StrCpy $R8 $R2 "" $R8 ;TempStrR
+
+ ;Insert the new string between the two separated parts of "String"
+ StrCpy $R2 $R7$R0$R8
+ ;Now calculate the new "StrLen" and "StartCharPos"
+ StrLen $R5 $R2
+ IntOp $R6 $R6 + $R3
+ ${Continue}
+ ${EndIf}
+
+ ;If not "StrToSearch", this could be "String" end
+ ${IfThen} $R6 >= $R5 ${|} ${ExitDo} ${|}
+ ;If not, continue the loop
+ IntOp $R6 $R6 + 1
+ ${Loop}
+
+ Done:
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = OutVar (output)*/
+
+ ;Return output to user
+ StrCpy $R0 $R2
+ Pop $R8
+ Pop $R7
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Exch $R0
+ FunctionEnd
+
+ !macroend
+
+ # Function StrSort
+ ################
+
+ !macro FUNCTION_STRING_StrSort
+ !insertmacro STRFUNC_FUNC `StrSort` `2004 Diego Pedroso - Based on functions by Stuart Welch`
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = String (input)
+ $R1 = LeftStr (input)
+ $R2 = CenterStr (input)
+ $R3 = RightStr (input)
+ $R4 = IncludeLeftStr (input)
+ $R5 = IncludeCenterStr (input)
+ $R6 = IncludeRightStr (input)
+
+ $0 = StrLen (temp)
+ $1 = LeftStrLen (temp)
+ $2 = CenterStrLen (temp)
+ $3 = RightStrLen (temp)
+ $4 = StartPos (temp)
+ $5 = EndPos (temp)
+ $6 = StartCharPos (temp)
+ $7 = EndCharPos (temp)
+ $8 = TempStr (temp)*/
+
+ ;Get input from user
+ Exch $R6
+ Exch
+ Exch $R5
+ Exch
+ Exch 2
+ Exch $R4
+ Exch 2
+ Exch 3
+ Exch $R3
+ Exch 3
+ Exch 4
+ Exch $R2
+ Exch 4
+ Exch 5
+ Exch $R1
+ Exch 5
+ Exch 6
+ Exch $R0
+ Exch 6
+ Push $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+
+ ;Parameter defaults
+ ${IfThen} $R4 == `` ${|} StrCpy $R4 `1` ${|}
+ ${IfThen} $R5 == `` ${|} StrCpy $R5 `1` ${|}
+ ${IfThen} $R6 == `` ${|} StrCpy $R6 `1` ${|}
+
+ ;Get "String", "CenterStr", "LeftStr" and "RightStr" length
+ StrLen $0 $R0
+ StrLen $1 $R1
+ StrLen $2 $R2
+ StrLen $3 $R3
+ ;Start "StartCharPos" counter
+ StrCpy $6 0
+ ;Start "EndCharPos" counter based on "CenterStr" length
+ IntOp $7 $6 + $2
+
+ ;Loop until "CenterStr" is found or "String" reaches its end
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $8 $R0 $2 $6
+
+ ;Compare "TempStr" with "CenterStr"
+ ${IfThen} $8 == $R2 ${|} ${ExitDo} ${|}
+ ;If not, this could be "String" end
+ ${IfThen} $7 >= $0 ${|} Goto Done ${|}
+ ;If not, continue the loop
+ IntOp $6 $6 + 1
+ IntOp $7 $7 + 1
+ ${Loop}
+
+ # "CenterStr" was found
+
+ ;Remove "CenterStr" from "String" if the user wants
+ ${If} $R5 = ${FALSE}
+ StrCpy $8 $R0 $6
+ StrCpy $R0 $R0 `` $7
+ StrCpy $R0 $8$R0
+ ${EndIf}
+
+ ;"StartPos" and "EndPos" will record "CenterStr" coordinates for now
+ StrCpy $4 $6
+ StrCpy $5 $7
+ ;"StartCharPos" and "EndCharPos" should be before "CenterStr"
+ IntOp $6 $6 - $1
+ IntOp $7 $6 + $1
+
+ ;Loop until "LeftStr" is found or "String" reaches its start
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $8 $R0 $1 $6
+
+ ;If "LeftStr" is empty
+ ${If} $R1 == ``
+ StrCpy $6 0
+ StrCpy $7 0
+ ${ExitDo}
+ ${EndIf}
+
+ ;Compare "TempStr" with "LeftStr"
+ ${IfThen} $8 == $R1 ${|} ${ExitDo} ${|}
+ ;If not, this could be "String" start
+ ${IfThen} $6 <= 0 ${|} ${ExitDo} ${|}
+ ;If not, continue the loop
+ IntOp $6 $6 - 1
+ IntOp $7 $7 - 1
+ ${Loop}
+
+ # "LeftStr" is found or "String" start was reached
+
+ ;Remove "LeftStr" from "String" if the user wants
+ ${If} $R4 = ${FALSE}
+ IntOp $6 $6 + $1
+ ${EndIf}
+
+ ;Record "LeftStr" first character position on "TempStr" (temporarily)
+ StrCpy $8 $6
+
+ ;"StartCharPos" and "EndCharPos" should be after "CenterStr"
+ ${If} $R5 = ${FALSE}
+ StrCpy $6 $4
+ ${Else}
+ IntOp $6 $4 + $2
+ ${EndIf}
+ IntOp $7 $6 + $3
+
+ ;Record "LeftStr" first character position on "StartPos"
+ StrCpy $4 $8
+
+ ;Loop until "RightStr" is found or "String" reaches its end
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $8 $R0 $3 $6
+
+ ;If "RightStr" is empty
+ ${If} $R3 == ``
+ StrCpy $6 $0
+ StrCpy $7 $0
+ ${ExitDo}
+ ${EndIf}
+
+ ;Compare "TempStr" with "RightStr"
+ ${IfThen} $8 == $R3 ${|} ${ExitDo} ${|}
+ ;If not, this could be "String" end
+ ${IfThen} $7 >= $0 ${|} ${ExitDo} ${|}
+ ;If not, continue the loop
+ IntOp $6 $6 + 1
+ IntOp $7 $7 + 1
+ ${Loop}
+
+ ;Remove "RightStr" from "String" if the user wants
+ ${If} $R6 = ${FALSE}
+ IntOp $7 $7 - $3
+ ${EndIf}
+
+ ;Record "RightStr" last character position on "StartPos"
+ StrCpy $5 $7
+
+ ;As the positionment is relative...
+ IntOp $5 $5 - $4
+
+ ;Write the string and finish the job
+ StrCpy $R0 $R0 $5 $4
+ Goto +2
+
+ Done:
+ StrCpy $R0 ``
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = OutVar (output)*/
+
+ ;Return output to user
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Exch $R0
+ FunctionEnd
+
+ !macroend
+
+ # Function StrStr
+ ###############
+
+ !macro FUNCTION_STRING_StrStr
+ !insertmacro STRFUNC_FUNC `StrStr` `2004 Diego Pedroso - Based on functions by Ximon Eighteen`
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = StrToSearch (input)
+ $R1 = String (input)
+ $R2 = StrToSearchLen (temp)
+ $R3 = StrLen (temp)
+ $R4 = StartCharPos (temp)
+ $R5 = TempStr (temp)*/
+
+ ;Get input from user
+ Exch $R0
+ Exch
+ Exch $R1
+ Push $R2
+ Push $R3
+ Push $R4
+ Push $R5
+
+ ;Get "String" and "StrToSearch" length
+ StrLen $R2 $R0
+ StrLen $R3 $R1
+ ;Start "StartCharPos" counter
+ StrCpy $R4 0
+
+ ;Loop until "StrToSearch" is found or "String" reaches its end
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $R5 $R1 $R2 $R4
+
+ ;Compare "TempStr" with "StrToSearch"
+ ${IfThen} $R5 == $R0 ${|} ${ExitDo} ${|}
+ ;If not "StrToSearch", this could be "String" end
+ ${IfThen} $R4 >= $R3 ${|} ${ExitDo} ${|}
+ ;If not, continue the loop
+ IntOp $R4 $R4 + 1
+ ${Loop}
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = OutVar (output)*/
+
+ ;Remove part before "StrToSearch" on "String" (if there has one)
+ StrCpy $R0 $R1 `` $R4
+
+ ;Return output to user
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Exch $R0
+ FunctionEnd
+
+ !macroend
+
+ # Function StrStrAdv
+ ##################
+
+ !macro FUNCTION_STRING_StrStrAdv
+ !insertmacro STRFUNC_FUNC `StrStrAdv` `2003-2004 Diego Pedroso`
+
+ /*After this point:
+ ------------------------------------------
+ $0 = String (input)
+ $1 = StringToSearch (input)
+ $2 = DirectionOfSearch (input)
+ $3 = DirectionOfReturn (input)
+ $4 = ShowStrToSearch (input)
+ $5 = NumLoops (input)
+ $6 = CaseSensitive (input)
+ $7 = StringLength (temp)
+ $8 = StrToSearchLength (temp)
+ $9 = CurrentLoop (temp)
+ $R0 = EndCharPos (temp)
+ $R1 = StartCharPos (temp)
+ $R2 = OutVar (output)
+ $R3 = Temp (temp)*/
+
+ ;Get input from user
+
+ Exch $6
+ Exch
+ Exch $5
+ Exch
+ Exch 2
+ Exch $4
+ Exch 2
+ Exch 3
+ Exch $3
+ Exch 3
+ Exch 4
+ Exch $2
+ Exch 4
+ Exch 5
+ Exch $1
+ Exch 5
+ Exch 6
+ Exch $0
+ Exch 6
+ Push $7
+ Push $8
+ Push $9
+ Push $R3
+ Push $R2
+ Push $R1
+ Push $R0
+
+ ; Clean $R0-$R3 variables
+ StrCpy $R0 ""
+ StrCpy $R1 ""
+ StrCpy $R2 ""
+ StrCpy $R3 ""
+
+ ; Verify if we have the correct values on the variables
+ ${If} $0 == ``
+ SetErrors ;AdvStrStr_StrToSearch not found
+ Goto AdvStrStr_End
+ ${EndIf}
+
+ ${If} $1 == ``
+ SetErrors ;No text to search
+ Goto AdvStrStr_End
+ ${EndIf}
+
+ ${If} $2 != <
+ StrCpy $2 >
+ ${EndIf}
+
+ ${If} $3 != <
+ StrCpy $3 >
+ ${EndIf}
+
+ ${If} $4 <> 0
+ StrCpy $4 1
+ ${EndIf}
+
+ ${If} $5 <= 0
+ StrCpy $5 0
+ ${EndIf}
+
+ ${If} $6 <> 1
+ StrCpy $6 0
+ ${EndIf}
+
+ ; Find "AdvStrStr_String" length
+ StrLen $7 $0
+
+ ; Then find "AdvStrStr_StrToSearch" length
+ StrLen $8 $1
+
+ ; Now set up basic variables
+
+ ${If} $2 == <
+ IntOp $R1 $7 - $8
+ StrCpy $R2 $7
+ ${Else}
+ StrCpy $R1 0
+ StrCpy $R2 $8
+ ${EndIf}
+
+ StrCpy $9 0 ; First loop
+
+ ;Let's begin the search
+
+ ${Do}
+ ; Step 1: If the starting or ending numbers are negative
+ ; or more than AdvStrStr_StringLen, we return
+ ; error
+
+ ${If} $R1 < 0
+ StrCpy $R1 ``
+ StrCpy $R2 ``
+ StrCpy $R3 ``
+ SetErrors ;AdvStrStr_StrToSearch not found
+ Goto AdvStrStr_End
+ ${ElseIf} $R2 > $7
+ StrCpy $R1 ``
+ StrCpy $R2 ``
+ StrCpy $R3 ``
+ SetErrors ;AdvStrStr_StrToSearch not found
+ Goto AdvStrStr_End
+ ${EndIf}
+
+ ; Step 2: Start the search depending on
+ ; AdvStrStr_DirectionOfSearch. Chop down not needed
+ ; characters.
+
+ ${If} $R1 <> 0
+ StrCpy $R3 $0 `` $R1
+ ${EndIf}
+
+ ${If} $R2 <> $7
+ ${If} $R1 = 0
+ StrCpy $R3 $0 $8
+ ${Else}
+ StrCpy $R3 $R3 $8
+ ${EndIf}
+ ${EndIf}
+
+ ; Step 3: Make sure that's the string we want
+
+ ; Case-Sensitive Support <- Use "AdvStrStr_Temp"
+ ; variable because it won't be used anymore
+
+ ${If} $6 == 1
+ System::Call `kernel32::lstrcmp(ts, ts) i.s` `$R3` `$1`
+ Pop $R3
+ ${If} $R3 = 0
+ StrCpy $R3 1 ; Continue
+ ${Else}
+ StrCpy $R3 0 ; Break
+ ${EndIf}
+ ${Else}
+ ${If} $R3 == $1
+ StrCpy $R3 1 ; Continue
+ ${Else}
+ StrCpy $R3 0 ; Break
+ ${EndIf}
+ ${EndIf}
+
+ ; After the comparasion, confirm that it is the
+ ; value we want.
+
+ ${If} $R3 = 1
+
+ ;We found it, return except if the user has set up to
+ ;search for another one:
+ ${If} $9 >= $5
+
+ ;Now, let's see if the user wants
+ ;AdvStrStr_StrToSearch to appear:
+ ${If} $4 == 0
+ ;Return depends on AdvStrStr_DirectionOfReturn
+ ${If} $3 == <
+ ; RTL
+ StrCpy $R0 $0 $R1
+ ${Else}
+ ; LTR
+ StrCpy $R0 $0 `` $R2
+ ${EndIf}
+ ${Break}
+ ${Else}
+ ;Return depends on AdvStrStr_DirectionOfReturn
+ ${If} $3 == <
+ ; RTL
+ StrCpy $R0 $0 $R2
+ ${Else}
+ ; LTR
+ StrCpy $R0 $0 `` $R1
+ ${EndIf}
+ ${Break}
+ ${EndIf}
+ ${Else}
+ ;If the user wants to have more loops, let's do it so!
+ IntOp $9 $9 + 1
+
+ ${If} $2 == <
+ IntOp $R1 $R1 - 1
+ IntOp $R2 $R2 - 1
+ ${Else}
+ IntOp $R1 $R1 + 1
+ IntOp $R2 $R2 + 1
+ ${EndIf}
+ ${EndIf}
+ ${Else}
+ ; Step 4: We didn't find it, so do steps 1 thru 3 again
+
+ ${If} $2 == <
+ IntOp $R1 $R1 - 1
+ IntOp $R2 $R2 - 1
+ ${Else}
+ IntOp $R1 $R1 + 1
+ IntOp $R2 $R2 + 1
+ ${EndIf}
+ ${EndIf}
+ ${Loop}
+
+ AdvStrStr_End:
+
+ ;Add 1 to AdvStrStr_EndCharPos to be supportable
+ ;by "StrCpy"
+
+ IntOp $R2 $R2 - 1
+
+ ;Return output to user
+
+ Exch $R0
+ Exch
+ Pop $R1
+ Exch
+ Pop $R2
+ Exch
+ Pop $R3
+ Exch
+ Pop $9
+ Exch
+ Pop $8
+ Exch
+ Pop $7
+ Exch
+ Pop $6
+ Exch
+ Pop $5
+ Exch
+ Pop $4
+ Exch
+ Pop $3
+ Exch
+ Pop $2
+ Exch
+ Pop $1
+ Exch
+ Pop $0
+
+ FunctionEnd
+
+ !macroend
+
+ # Function StrTok
+ ###############
+
+ !macro FUNCTION_STRING_StrTok
+ !insertmacro STRFUNC_FUNC `StrTok` `2004 Diego Pedroso - Based on functions by "bigmac666"`
+ /*After this point:
+ ------------------------------------------
+ $0 = SkipEmptyParts (input)
+ $1 = ResultPart (input)
+ $2 = Separators (input)
+ $3 = String (input)
+ $4 = StrToSearchLen (temp)
+ $5 = StrLen (temp)
+ $6 = StartCharPos (temp)
+ $7 = TempStr (temp)
+ $8 = CurrentLoop
+ $9 = CurrentSepChar
+ $R0 = CurrentSepCharNum
+ */
+
+ ;Get input from user
+ Exch $0
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $2
+ Exch 2
+ Exch 3
+ Exch $3
+ Exch 3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R0
+
+ ;Parameter defaults
+ ${IfThen} $2 == `` ${|} StrCpy $2 `|` ${|}
+ ${IfThen} $1 == `` ${|} StrCpy $1 `L` ${|}
+ ${IfThen} $0 == `` ${|} StrCpy $0 `0` ${|}
+
+ ;Get "String" and "StrToSearch" length
+ StrLen $4 $2
+ StrLen $5 $3
+ ;Start "StartCharPos" and "ResultPart" counters
+ StrCpy $6 0
+ StrCpy $8 -1
+
+ ;Loop until "ResultPart" is met, "StrToSearch" is found or
+ ;"String" reaches its end
+ ResultPartLoop: ;"CurrentLoop" Loop
+
+ ;Increase "CurrentLoop" counter
+ IntOp $8 $8 + 1
+
+ StrSearchLoop:
+ ${Do} ;"String" Loop
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $7 $3 1 $6
+
+ ;Verify if it's the "String" end
+ ${If} $6 >= $5
+ ;If "CurrentLoop" is what the user wants, remove the part
+ ;after "TempStr" and itself and get out of here
+ ${If} $8 == $1
+ ${OrIf} $1 == `L`
+ StrCpy $3 $3 $6
+ ${Else} ;If not, empty "String" and get out of here
+ StrCpy $3 ``
+ ${EndIf}
+ StrCpy $R0 `End`
+ ${ExitDo}
+ ${EndIf}
+
+ ;Start "CurrentSepCharNum" counter (for "Separators" Loop)
+ StrCpy $R0 0
+
+ ${Do} ;"Separators" Loop
+ ;Use one "Separators" character at a time
+ ${If} $R0 <> 0
+ StrCpy $9 $2 1 $R0
+ ${Else}
+ StrCpy $9 $2 1
+ ${EndIf}
+
+ ;Go to the next "String" char if it's "Separators" end
+ ${IfThen} $R0 >= $4 ${|} ${ExitDo} ${|}
+
+ ;Or, if "TempStr" equals "CurrentSepChar", then...
+ ${If} $7 == $9
+ StrCpy $7 $3 $6
+
+ ;If "String" is empty because this result part doesn't
+ ;contain data, verify if "SkipEmptyParts" is activated,
+ ;so we don't return the output to user yet
+
+ ${If} $7 == ``
+ ${AndIf} $0 = ${TRUE}
+ IntOp $6 $6 + 1
+ StrCpy $3 $3 `` $6
+ StrCpy $6 0
+ Goto StrSearchLoop
+ ${ElseIf} $8 == $1
+ StrCpy $3 $3 $6
+ StrCpy $R0 "End"
+ ${ExitDo}
+ ${EndIf} ;If not, go to the next result part
+ IntOp $6 $6 + 1
+ StrCpy $3 $3 `` $6
+ StrCpy $6 0
+ Goto ResultPartLoop
+ ${EndIf}
+
+ ;Increase "CurrentSepCharNum" counter
+ IntOp $R0 $R0 + 1
+ ${Loop}
+ ${IfThen} $R0 == "End" ${|} ${ExitDo} ${|}
+
+ ;Increase "StartCharPos" counter
+ IntOp $6 $6 + 1
+ ${Loop}
+
+ /*After this point:
+ ------------------------------------------
+ $3 = OutVar (output)*/
+
+ ;Return output to user
+
+ Pop $R0
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $0
+ Pop $1
+ Pop $2
+ Exch $3
+ FunctionEnd
+
+ !macroend
+
+ # Function StrTrimNewLines
+ ########################
+
+ !macro FUNCTION_STRING_StrTrimNewLines
+ !insertmacro STRFUNC_FUNC `StrTrimNewLines` `2004 Diego Pedroso - Based on functions by Ximon Eighteen`
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = String (input)
+ $R1 = TrimCounter (temp)
+ $R2 = Temp (temp)*/
+
+ ;Get input from user
+ Exch $R0
+ Push $R1
+ Push $R2
+
+ ;Initialize trim counter
+ StrCpy $R1 0
+
+ loop:
+ ;Subtract to get "String"'s last characters
+ IntOp $R1 $R1 - 1
+
+ ;Verify if they are either $\r or $\n
+ StrCpy $R2 $R0 1 $R1
+ ${If} $R2 == `$\r`
+ ${OrIf} $R2 == `$\n`
+ Goto loop
+ ${EndIf}
+
+ ;Trim characters (if needed)
+ IntOp $R1 $R1 + 1
+ ${If} $R1 < 0
+ StrCpy $R0 $R0 $R1
+ ${EndIf}
+
+ /*After this point:
+ ------------------------------------------
+ $R0 = OutVar (output)*/
+
+ ;Return output to user
+ Pop $R2
+ Pop $R1
+ Exch $R0
+ FunctionEnd
+
+ !macroend
+
+ ;Function Calls for Install and Uninstall
+
+ !macro FUNCTION_STRING_StrCase_Call ResultVar String Type
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrCase} "${ResultVar}" "${String}" "${Type}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${Type}`
+ Call StrCase
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrCase_Call ResultVar String Type
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrCase} "${ResultVar}" "${String}" "${Type}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${Type}`
+ Call un.StrCase
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrClb_Call ResultVar String Action
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrClb} "${ResultVar}" "${String}" "${Action}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${Action}`
+ Call StrClb
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrClb_Call ResultVar String Action
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrClb} "${ResultVar}" "${String}" "${Action}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${Action}`
+ Call un.StrClb
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrIOToNSIS_Call ResultVar String
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrIOToNSIS} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call StrIOToNSIS
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrIOToNSIS_Call ResultVar String
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrIOToNSIS} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call un.StrIOToNSIS
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrLoc_Call ResultVar String StrToSearchFor OffsetDirection
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrLoc} "${ResultVar}" "${String}" "${StrToSearchFor}" "${OffsetDirection}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StrToSearchFor}`
+ Push `${OffsetDirection}`
+ Call StrLoc
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrLoc_Call ResultVar String StrToSearchFor OffsetDirection
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrLoc} "${ResultVar}" "${String}" "${StrToSearchFor}" "${OffsetDirection}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StrToSearchFor}`
+ Push `${OffsetDirection}`
+ Call un.StrLoc
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrNSISToIO_Call ResultVar String
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrNSISToIO} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call StrNSISToIO
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrNSISToIO_Call ResultVar String
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrNSISToIO} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call un.StrNSISToIO
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrRep_Call ResultVar String StringToReplace ReplacementString
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrRep} "${ResultVar}" "${String}" "${StringToReplace}" "${ReplacementString}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StringToReplace}`
+ Push `${ReplacementString}`
+ Call StrRep
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrRep_Call ResultVar String StringToReplace ReplacementString
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrRep} "${ResultVar}" "${String}" "${StringToReplace}" "${ReplacementString}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StringToReplace}`
+ Push `${ReplacementString}`
+ Call un.StrRep
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrSort_Call ResultVar String CenterStr LeftStr RightStr IncludeCenterStr IncludeLeftStr IncludeRightStr
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrSort} "${ResultVar}" "${String}" "${CenterStr}" "${LeftStr}" "${RightStr}" "${IncludeCenterStr}" "${IncludeLeftStr}" "${IncludeRightStr}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${CenterStr}`
+ Push `${LeftStr}`
+ Push `${RightStr}`
+ Push `${IncludeCenterStr}`
+ Push `${IncludeLeftStr}`
+ Push `${IncludeRightStr}`
+ Call StrSort
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrSort_Call ResultVar String CenterStr LeftStr RightStr IncludeCenterStr IncludeLeftStr IncludeRightStr
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrSort} "${ResultVar}" "${String}" "${CenterStr}" "${LeftStr}" "${RightStr}" "${IncludeCenterStr}" "${IncludeLeftStr}" "${IncludeRightStr}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${CenterStr}`
+ Push `${LeftStr}`
+ Push `${RightStr}`
+ Push `${IncludeCenterStr}`
+ Push `${IncludeLeftStr}`
+ Push `${IncludeRightStr}`
+ Call un.StrSort
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrStr_Call ResultVar String StrToSearchFor
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrStr} "${ResultVar}" "${String}" "${StrToSearchFor}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StrToSearchFor}`
+ Call StrStr
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrStr_Call ResultVar String StrToSearchFor
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrStr} "${ResultVar}" "${String}" "${StrToSearchFor}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StrToSearchFor}`
+ Call un.StrStr
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrStrAdv_Call ResultVar String StrToSearchFor SearchDirection ResultStrDirection DisplayStrToSearch Loops CaseSensitive
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrStrAdv} "${ResultVar}" "${String}" "${StrToSearchFor}" "${SearchDirection}" "${ResultStrDirection}" "${DisplayStrToSearch}" "${Loops}" "${CaseSensitive}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StrToSearchFor}`
+ Push `${SearchDirection}`
+ Push `${ResultStrDirection}`
+ Push `${DisplayStrToSearch}`
+ Push `${Loops}`
+ Push `${CaseSensitive}`
+ Call StrStrAdv
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrStrAdv_Call ResultVar String StrToSearchFor SearchDirection ResultStrDirection DisplayStrToSearch Loops CaseSensitive
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrStrAdv} "${ResultVar}" "${String}" "${StrToSearchFor}" "${SearchDirection}" "${ResultStrDirection}" "${DisplayStrToSearch}" "${Loops}" "${CaseSensitive}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${StrToSearchFor}`
+ Push `${SearchDirection}`
+ Push `${ResultStrDirection}`
+ Push `${DisplayStrToSearch}`
+ Push `${Loops}`
+ Push `${CaseSensitive}`
+ Call un.StrStrAdv
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrTok_Call ResultVar String Separators ResultPart SkipEmptyParts
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrTok} "${ResultVar}" "${String}" "${Separators}" "${ResultPart}" "${SkipEmptyParts}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${Separators}`
+ Push `${ResultPart}`
+ Push `${SkipEmptyParts}`
+ Call StrTok
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrTok_Call ResultVar String Separators ResultPart SkipEmptyParts
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrTok} "${ResultVar}" "${String}" "${Separators}" "${ResultPart}" "${SkipEmptyParts}"`
+ !verbose pop
+
+ Push `${String}`
+ Push `${Separators}`
+ Push `${ResultPart}`
+ Push `${SkipEmptyParts}`
+ Call un.StrTok
+ Pop `${ResultVar}`
+ !macroend
+
+ !macro FUNCTION_STRING_StrTrimNewLines_Call ResultVar String
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {StrTrimNewLines} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call StrTrimNewLines
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrTrimNewLines_Call ResultVar String
+ !verbose push ${_STRFUNC_CREDITVERBOSITY}
+ !echo `$ {UnStrTrimNewLines} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call un.StrTrimNewLines
+ Pop `${ResultVar}`
+ !macroend
+
+!endif
+!verbose 3
+!define STRFUNC_VERBOSITY ${_STRFUNC_VERBOSITY}
+!undef _STRFUNC_VERBOSITY
+!verbose pop
diff --git a/KattekerCreator/nsis/Include/TextFunc.nsh b/KattekerCreator/nsis/Include/TextFunc.nsh
new file mode 100644
index 0000000..230835b
--- /dev/null
+++ b/KattekerCreator/nsis/Include/TextFunc.nsh
@@ -0,0 +1,1211 @@
+/*
+_____________________________________________________________________________
+
+ Text Functions Header v2.4
+_____________________________________________________________________________
+
+ 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+ See documentation for more information about the following functions.
+
+ Usage in script:
+ 1. !include "TextFunc.nsh"
+ 2. [Section|Function]
+ ${TextFunction} "File" "..." $var
+ [SectionEnd|FunctionEnd]
+
+
+ TextFunction=[LineFind|LineRead|FileReadFromEnd|LineSum|FileJoin|
+ TextCompare|TextCompareS|ConfigRead|ConfigReadS|
+ ConfigWrite|ConfigWriteS|FileRecode|TrimNewLines]
+
+_____________________________________________________________________________
+
+ Thanks to:
+_____________________________________________________________________________
+
+LineRead
+ Afrow UK (Based on his idea of Function "ReadFileLine")
+LineSum
+ Afrow UK (Based on his idea of Function "LineCount")
+FileJoin
+ Afrow UK (Based on his idea of Function "JoinFiles")
+ConfigRead
+ vbgunz (His idea)
+ConfigWrite
+ vbgunz (His idea)
+TrimNewLines
+ sunjammer (Based on his Function "TrimNewLines")
+*/
+
+
+;_____________________________________________________________________________
+;
+; Macros
+;_____________________________________________________________________________
+;
+; Change log window verbosity (default: 3=no script)
+;
+; Example:
+; !include "TextFunc.nsh"
+; !insertmacro LineFind
+; ${TEXTFUNC_VERBOSE} 4 # all verbosity
+; !insertmacro LineSum
+; ${TEXTFUNC_VERBOSE} 3 # no script
+
+!ifndef TEXTFUNC_INCLUDED
+
+!verbose push 3
+!define /IfNDef _TEXTFUNC_VERBOSE 3
+!verbose ${_TEXTFUNC_VERBOSE}
+!define TEXTFUNC_VERBOSE `!insertmacro TEXTFUNC_VERBOSE`
+
+!define TEXTFUNC_INCLUDED
+
+!include FileFunc.nsh
+!include Util.nsh
+
+
+!macro TEXTFUNC_VERBOSE _VERBOSE
+ !verbose push 3
+ !define /ReDef _TEXTFUNC_VERBOSE ${_VERBOSE}
+ !verbose pop
+!macroend
+
+!macro LineFindCall _INPUT _OUTPUT _RANGE _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_INPUT}`
+ Push `${_OUTPUT}`
+ Push `${_RANGE}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ ${CallArtificialFunction} LineFind_
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro LineReadCall _FILE _NUMBER _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} LineRead_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro FileReadFromEndCall _FILE _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ ${CallArtificialFunction} FileReadFromEnd_
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro LineSumCall _FILE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ ${CallArtificialFunction} LineSum_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro FileJoinCall _FILE1 _FILE2 _FILE3
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_FILE3}`
+ ${CallArtificialFunction} FileJoin_
+ !verbose pop
+!macroend
+
+!macro TextCompareCall _FILE1 _FILE2 _OPTION _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_OPTION}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ ${CallArtificialFunction} TextCompare_
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro TextCompareSCall _FILE1 _FILE2 _OPTION _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_OPTION}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ ${CallArtificialFunction} TextCompareS_
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro ConfigReadCall _FILE _ENTRY _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ ${CallArtificialFunction} ConfigRead_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro ConfigReadSCall _FILE _ENTRY _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ ${CallArtificialFunction} ConfigReadS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro ConfigWriteCall _FILE _ENTRY _VALUE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Push `${_VALUE}`
+ ${CallArtificialFunction} ConfigWrite_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro ConfigWriteSCall _FILE _ENTRY _VALUE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Push `${_VALUE}`
+ ${CallArtificialFunction} ConfigWriteS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro FileRecodeCall _FILE _FORMAT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_FORMAT}`
+ ${CallArtificialFunction} FileRecode_
+ !verbose pop
+!macroend
+
+!macro TrimNewLinesCall _FILE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ ${CallArtificialFunction} TrimNewLines_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro _TextFunc_TempFileForFile _FILE _RESULT
+ # XXX replace with GetParent
+ Push `${_FILE}`
+ Exch $0
+ Push $1
+ Push $2
+
+ StrCpy $2 $0 1 -1
+ StrCmp $2 '\' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+
+ StrCpy $1 0
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '\' +2
+ StrCmp $2 '' 0 -3
+ StrCpy $0 $0 $1
+
+ Pop $2
+ Pop $1
+ Exch $0
+ Pop ${_RESULT}
+ # XXX
+ StrCmp ${_RESULT} "" 0 +2
+ StrCpy ${_RESULT} $EXEDIR
+ GetTempFileName ${_RESULT} ${_RESULT}
+ StrCmp ${_RESULT} "" 0 +2
+ GetTempFileName ${_RESULT}
+ ClearErrors
+!macroend
+
+!define LineFind `!insertmacro LineFindCall`
+!define un.LineFind `!insertmacro LineFindCall`
+
+!macro LineFind
+!macroend
+
+!macro un.LineFind
+!macroend
+
+!macro LineFind_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ Exch $3
+ Exch
+ Exch $2
+ Exch
+ Exch 2
+ Exch $1
+ Exch 2
+ Exch 3
+ Exch $0
+ Exch 3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R4
+ Push $R5
+ Push $R6
+ Push $R7
+ Push $R8
+ Push $R9
+ ClearErrors
+
+ IfFileExists '$0' 0 TextFunc_LineFind_error
+ StrCmp $1 '/NUL' TextFunc_LineFind_begin
+ StrCpy $8 0
+ IntOp $8 $8 - 1
+ StrCpy $9 $1 1 $8
+ StrCmp $9 \ +2
+ StrCmp $9 '' +3 -3
+ StrCpy $9 $1 $8
+ IfFileExists '$9\*.*' 0 TextFunc_LineFind_error
+
+ TextFunc_LineFind_begin:
+ StrCpy $4 1
+ StrCpy $5 -1
+ StrCpy $6 0
+ StrCpy $7 0
+ StrCpy $R4 ''
+ StrCpy $R6 ''
+ StrCpy $R7 ''
+ StrCpy $R8 0
+
+ StrCpy $8 $2 1
+ StrCmp $8 '{' 0 TextFunc_LineFind_delspaces
+ StrCpy $2 $2 '' 1
+ StrCpy $8 $2 1 -1
+ StrCmp $8 '}' 0 TextFunc_LineFind_delspaces
+ StrCpy $2 $2 -1
+ StrCpy $R6 TextFunc_LineFind_cut
+
+ TextFunc_LineFind_delspaces:
+ StrCpy $8 $2 1
+ StrCmp $8 ' ' 0 +3
+ StrCpy $2 $2 '' 1
+ goto -3
+ StrCmp $2$7 '0' TextFunc_LineFind_file
+ StrCpy $4 ''
+ StrCpy $5 ''
+ StrCmp $2 '' TextFunc_LineFind_writechk
+
+ TextFunc_LineFind_range:
+ StrCpy $8 0
+ StrCpy $9 $2 1 $8
+ StrCmp $9 '' +5
+ StrCmp $9 ' ' +4
+ StrCmp $9 ':' +3
+ IntOp $8 $8 + 1
+ goto -5
+ StrCpy $5 $2 $8
+ IntOp $5 $5 + 0
+ IntOp $8 $8 + 1
+ StrCpy $2 $2 '' $8
+ StrCmp $4 '' 0 +2
+ StrCpy $4 $5
+ StrCmp $9 ':' TextFunc_LineFind_range
+
+ IntCmp $4 0 0 +2
+ IntCmp $5 -1 TextFunc_LineFind_goto 0 TextFunc_LineFind_growthcmp
+ StrCmp $R7 '' 0 TextFunc_LineFind_minus2plus
+ StrCpy $R7 0
+ FileOpen $8 $0 r
+ FileRead $8 $9
+ IfErrors +3
+ IntOp $R7 $R7 + 1
+ Goto -3
+ FileClose $8
+
+ TextFunc_LineFind_minus2plus:
+ IntCmp $4 0 +5 0 +5
+ IntOp $4 $R7 + $4
+ IntOp $4 $4 + 1
+ IntCmp $4 0 +2 0 +2
+ StrCpy $4 0
+ IntCmp $5 -1 TextFunc_LineFind_goto 0 TextFunc_LineFind_growthcmp
+ IntOp $5 $R7 + $5
+ IntOp $5 $5 + 1
+ TextFunc_LineFind_growthcmp:
+ IntCmp $4 $5 TextFunc_LineFind_goto TextFunc_LineFind_goto
+ StrCpy $5 $4
+ TextFunc_LineFind_goto:
+ goto $7
+
+ TextFunc_LineFind_file:
+ StrCmp $1 '/NUL' TextFunc_LineFind_notemp
+ !insertmacro _TextFunc_TempFileForFile $1 $R4
+ Push $R4
+ FileOpen $R4 $R4 w
+ TextFunc_LineFind_notemp:
+ FileOpen $R5 $0 r
+ IfErrors TextFunc_LineFind_preerror
+
+ TextFunc_LineFind_loop:
+ IntOp $R8 $R8 + 1
+ FileRead $R5 $R9
+ IfErrors TextFunc_LineFind_handleclose
+
+ TextFunc_LineFind_cmp:
+ StrCmp $2$4$5 '' TextFunc_LineFind_writechk
+ IntCmp $4 $R8 TextFunc_LineFind_call 0 TextFunc_LineFind_writechk
+ StrCmp $5 -1 TextFunc_LineFind_call
+ IntCmp $5 $R8 TextFunc_LineFind_call 0 TextFunc_LineFind_call
+
+ GetLabelAddress $7 TextFunc_LineFind_cmp
+ goto TextFunc_LineFind_delspaces
+
+ TextFunc_LineFind_call:
+ StrCpy $7 $R9
+ Push $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $R4
+ Push $R5
+ Push $R6
+ Push $R7
+ Push $R8
+ StrCpy $R6 '$4:$5'
+ StrCmp $R7 '' +3
+ IntOp $R7 $R8 - $R7
+ IntOp $R7 $R7 - 1
+ Call $3
+ Pop $9
+ Pop $R8
+ Pop $R7
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ IfErrors TextFunc_LineFind_preerror
+ StrCmp $9 'StopLineFind' 0 +3
+ IntOp $6 $6 + 1
+ goto TextFunc_LineFind_handleclose
+ StrCmp $1 '/NUL' TextFunc_LineFind_loop
+ StrCmp $9 'SkipWrite' 0 +3
+ IntOp $6 $6 + 1
+ goto TextFunc_LineFind_loop
+ StrCmp $7 $R9 TextFunc_LineFind_write
+ IntOp $6 $6 + 1
+ goto TextFunc_LineFind_write
+
+ TextFunc_LineFind_writechk:
+ StrCmp $1 '/NUL' TextFunc_LineFind_loop
+ StrCmp $R6 TextFunc_LineFind_cut 0 TextFunc_LineFind_write
+ IntOp $6 $6 + 1
+ goto TextFunc_LineFind_loop
+
+ TextFunc_LineFind_write:
+ FileWrite $R4 $R9
+ goto TextFunc_LineFind_loop
+
+ TextFunc_LineFind_preerror:
+ SetErrors
+
+ TextFunc_LineFind_handleclose:
+ StrCmp $1 '/NUL' +3
+ FileClose $R4
+ Pop $R4
+ FileClose $R5
+ IfErrors TextFunc_LineFind_error
+
+ StrCmp $1 '/NUL' TextFunc_LineFind_end
+ StrCmp $1 '' 0 +2
+ StrCpy $1 $0
+ StrCmp $6 0 0 TextFunc_LineFind_rename
+ FileOpen $7 $0 r
+ FileSeek $7 0 END $8
+ FileClose $7
+ FileOpen $7 $R4 r
+ FileSeek $7 0 END $9
+ FileClose $7
+ IntCmp $8 $9 0 TextFunc_LineFind_rename
+ Delete $R4
+ StrCmp $1 $0 TextFunc_LineFind_end
+ CopyFiles /SILENT $0 $1
+ goto TextFunc_LineFind_end
+
+ TextFunc_LineFind_rename:
+ Delete '$EXEDIR\$1'
+ Rename $R4 '$EXEDIR\$1'
+ IfErrors 0 TextFunc_LineFind_end
+ Delete $1
+ Rename $R4 $1
+ IfErrors 0 TextFunc_LineFind_end
+
+ TextFunc_LineFind_error:
+ SetErrors
+
+ TextFunc_LineFind_end:
+ Pop $R9
+ Pop $R8
+ Pop $R7
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ !verbose pop
+!macroend
+
+!define LineRead `!insertmacro LineReadCall`
+!define un.LineRead `!insertmacro LineReadCall`
+
+!macro LineRead
+!macroend
+
+!macro un.LineRead
+!macroend
+
+!macro LineRead_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ ClearErrors
+
+ IfFileExists $0 0 TextFunc_LineRead_error
+ IntOp $1 $1 + 0
+ IntCmp $1 0 TextFunc_LineRead_error 0 TextFunc_LineRead_plus
+ StrCpy $4 0
+ FileOpen $2 $0 r
+ IfErrors TextFunc_LineRead_error
+ FileRead $2 $3
+ IfErrors +3
+ IntOp $4 $4 + 1
+ Goto -3
+ FileClose $2
+ IntOp $1 $4 + $1
+ IntOp $1 $1 + 1
+ IntCmp $1 0 TextFunc_LineRead_error TextFunc_LineRead_error
+
+ TextFunc_LineRead_plus:
+ FileOpen $2 $0 r
+ IfErrors TextFunc_LineRead_error
+ StrCpy $3 0
+ IntOp $3 $3 + 1
+ FileRead $2 $0
+ IfErrors +4
+ StrCmp $3 $1 0 -3
+ FileClose $2
+ goto TextFunc_LineRead_end
+ FileClose $2
+
+ TextFunc_LineRead_error:
+ SetErrors
+ StrCpy $0 ''
+
+ TextFunc_LineRead_end:
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define FileReadFromEnd `!insertmacro FileReadFromEndCall`
+!define un.FileReadFromEnd `!insertmacro FileReadFromEndCall`
+
+!macro FileReadFromEnd
+!macroend
+
+!macro un.FileReadFromEnd
+!macroend
+
+!macro FileReadFromEnd_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $7
+ Push $8
+ Push $9
+ ClearErrors
+
+ StrCpy $7 -1
+ StrCpy $8 0
+ IfFileExists $0 0 TextFunc_FileReadFromEnd_error
+ FileOpen $0 $0 r
+ IfErrors TextFunc_FileReadFromEnd_error
+ FileRead $0 $9
+ IfErrors +4
+ Push $9
+ IntOp $8 $8 + 1
+ goto -4
+ FileClose $0
+
+ TextFunc_FileReadFromEnd_nextline:
+ StrCmp $8 0 TextFunc_FileReadFromEnd_end
+ Pop $9
+ Push $1
+ Push $7
+ Push $8
+ Call $1
+ Pop $0
+ Pop $8
+ Pop $7
+ Pop $1
+ IntOp $7 $7 - 1
+ IntOp $8 $8 - 1
+ IfErrors TextFunc_FileReadFromEnd_error
+ StrCmp $0 'StopFileReadFromEnd' TextFunc_FileReadFromEnd_clearstack TextFunc_FileReadFromEnd_nextline
+
+ TextFunc_FileReadFromEnd_error:
+ SetErrors
+
+ TextFunc_FileReadFromEnd_clearstack:
+ StrCmp $8 0 TextFunc_FileReadFromEnd_end
+ Pop $9
+ IntOp $8 $8 - 1
+ goto TextFunc_FileReadFromEnd_clearstack
+
+ TextFunc_FileReadFromEnd_end:
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $1
+ Pop $0
+
+ !verbose pop
+!macroend
+
+!define LineSum `!insertmacro LineSumCall`
+!define un.LineSum `!insertmacro LineSumCall`
+
+!macro LineSum
+!macroend
+
+!macro un.LineSum
+!macroend
+
+!macro LineSum_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+ ClearErrors
+
+ IfFileExists $0 0 TextFunc_LineSum_error
+ StrCpy $2 0
+ FileOpen $0 $0 r
+ IfErrors TextFunc_LineSum_error
+ FileRead $0 $1
+ IfErrors +3
+ IntOp $2 $2 + 1
+ Goto -3
+ FileClose $0
+ StrCpy $0 $2
+ goto TextFunc_LineSum_end
+
+ TextFunc_LineSum_error:
+ SetErrors
+ StrCpy $0 ''
+
+ TextFunc_LineSum_end:
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define FileJoin `!insertmacro FileJoinCall`
+!define un.FileJoin `!insertmacro FileJoinCall`
+
+!macro FileJoin
+!macroend
+
+!macro un.FileJoin
+!macroend
+
+!macro FileJoin_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Push $3
+ Push $4
+ Push $5
+ ClearErrors
+
+ IfFileExists $0 0 TextFunc_FileJoin_error
+ IfFileExists $1 0 TextFunc_FileJoin_error
+ StrCpy $3 0
+ IntOp $3 $3 - 1
+ StrCpy $4 $2 1 $3
+ StrCmp $4 \ +2
+ StrCmp $4 '' +3 -3
+ StrCpy $4 $2 $3
+ IfFileExists '$4\*.*' 0 TextFunc_FileJoin_error
+
+ StrCmp $2 $0 0 +2
+ StrCpy $2 ''
+ StrCmp $2 '' 0 +3
+ StrCpy $4 $0
+ Goto TextFunc_FileJoin_notemp
+ !insertmacro _TextFunc_TempFileForFile $2 $4
+ CopyFiles /SILENT $0 $4
+ TextFunc_FileJoin_notemp:
+ FileOpen $3 $4 a
+ IfErrors TextFunc_FileJoin_error
+ FileSeek $3 -1 END
+ FileRead $3 $5
+ StrCmp $5 '$\r' +3
+ StrCmp $5 '$\n' +2
+ FileWrite $3 '$\r$\n'
+
+ ;FileWrite $3 '$\r$\n--Divider--$\r$\n'
+
+ FileOpen $0 $1 r
+ IfErrors TextFunc_FileJoin_error
+ FileRead $0 $5
+ IfErrors +3
+ FileWrite $3 $5
+ goto -3
+ FileClose $0
+ FileClose $3
+ StrCmp $2 '' TextFunc_FileJoin_end
+ Delete '$EXEDIR\$2'
+ Rename $4 '$EXEDIR\$2'
+ IfErrors 0 TextFunc_FileJoin_end
+ Delete $2
+ Rename $4 $2
+ IfErrors 0 TextFunc_FileJoin_end
+
+ TextFunc_FileJoin_error:
+ SetErrors
+
+ TextFunc_FileJoin_end:
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ !verbose pop
+!macroend
+
+!macro TextCompareBody _TEXTFUNC_S
+ Exch $3
+ Exch
+ Exch $2
+ Exch
+ Exch 2
+ Exch $1
+ Exch 2
+ Exch 3
+ Exch $0
+ Exch 3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ ClearErrors
+
+ IfFileExists $0 0 TextFunc_TextCompare${_TEXTFUNC_S}_error
+ IfFileExists $1 0 TextFunc_TextCompare${_TEXTFUNC_S}_error
+ StrCmp $2 'FastDiff' +5
+ StrCmp $2 'FastEqual' +4
+ StrCmp $2 'SlowDiff' +3
+ StrCmp $2 'SlowEqual' +2
+ goto TextFunc_TextCompare${_TEXTFUNC_S}_error
+
+ FileOpen $4 $0 r
+ IfErrors TextFunc_TextCompare${_TEXTFUNC_S}_error
+ FileOpen $5 $1 r
+ IfErrors TextFunc_TextCompare${_TEXTFUNC_S}_error
+ SetDetailsPrint textonly
+
+ StrCpy $6 0
+ StrCpy $8 0
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_nextline:
+ StrCmp${_TEXTFUNC_S} $4 '' TextFunc_TextCompare${_TEXTFUNC_S}_fast
+ IntOp $8 $8 + 1
+ FileRead $4 $9
+ IfErrors 0 +4
+ FileClose $4
+ StrCpy $4 ''
+ StrCmp${_TEXTFUNC_S} $5 '' TextFunc_TextCompare${_TEXTFUNC_S}_end
+ StrCmp $2 'FastDiff' TextFunc_TextCompare${_TEXTFUNC_S}_fast
+ StrCmp $2 'FastEqual' TextFunc_TextCompare${_TEXTFUNC_S}_fast TextFunc_TextCompare${_TEXTFUNC_S}_slow
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_fast:
+ StrCmp${_TEXTFUNC_S} $5 '' TextFunc_TextCompare${_TEXTFUNC_S}_call
+ IntOp $6 $6 + 1
+ FileRead $5 $7
+ IfErrors 0 +5
+ FileClose $5
+ StrCpy $5 ''
+ StrCmp${_TEXTFUNC_S} $4 '' TextFunc_TextCompare${_TEXTFUNC_S}_end
+ StrCmp $2 'FastDiff' TextFunc_TextCompare${_TEXTFUNC_S}_call TextFunc_TextCompare${_TEXTFUNC_S}_close
+ StrCmp $2 'FastDiff' 0 +2
+ StrCmp${_TEXTFUNC_S} $7 $9 TextFunc_TextCompare${_TEXTFUNC_S}_nextline TextFunc_TextCompare${_TEXTFUNC_S}_call
+ StrCmp${_TEXTFUNC_S} $7 $9 TextFunc_TextCompare${_TEXTFUNC_S}_call TextFunc_TextCompare${_TEXTFUNC_S}_nextline
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_slow:
+ StrCmp${_TEXTFUNC_S} $4 '' TextFunc_TextCompare${_TEXTFUNC_S}_close
+ StrCpy $6 ''
+ DetailPrint '$8. $9'
+ FileSeek $5 0
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_slownext:
+ FileRead $5 $7
+ IfErrors 0 +2
+ StrCmp $2 'SlowDiff' TextFunc_TextCompare${_TEXTFUNC_S}_call TextFunc_TextCompare${_TEXTFUNC_S}_nextline
+ StrCmp $2 'SlowDiff' 0 +2
+ StrCmp${_TEXTFUNC_S} $7 $9 TextFunc_TextCompare${_TEXTFUNC_S}_nextline TextFunc_TextCompare${_TEXTFUNC_S}_slownext
+ IntOp $6 $6 + 1
+ StrCmp${_TEXTFUNC_S} $7 $9 0 TextFunc_TextCompare${_TEXTFUNC_S}_slownext
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_call:
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Call $3
+ Pop $0
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ StrCmp $0 'StopTextCompare' 0 TextFunc_TextCompare${_TEXTFUNC_S}_nextline
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_close:
+ FileClose $4
+ FileClose $5
+ goto TextFunc_TextCompare${_TEXTFUNC_S}_end
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_error:
+ SetErrors
+
+ TextFunc_TextCompare${_TEXTFUNC_S}_end:
+ SetDetailsPrint both
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+!macroend
+
+!define TextCompare `!insertmacro TextCompareCall`
+!define un.TextCompare `!insertmacro TextCompareCall`
+
+!macro TextCompare
+!macroend
+
+!macro un.TextCompare
+!macroend
+
+!macro TextCompare_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ !insertmacro TextCompareBody ''
+
+ !verbose pop
+!macroend
+
+!define TextCompareS `!insertmacro TextCompareSCall`
+!define un.TextCompareS `!insertmacro TextCompareSCall`
+
+!macro TextCompareS
+!macroend
+
+!macro un.TextCompareS
+!macroend
+
+!macro TextCompareS_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ !insertmacro TextCompareBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro ConfigReadBody _TEXTFUNC_S
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ ClearErrors
+
+ FileOpen $2 $0 r
+ IfErrors TextFunc_ConfigRead${_TEXTFUNC_S}_error
+ StrLen $0 $1
+ StrCmp${_TEXTFUNC_S} $0 0 TextFunc_ConfigRead${_TEXTFUNC_S}_error
+
+ TextFunc_ConfigRead${_TEXTFUNC_S}_readnext:
+ FileRead $2 $3
+ IfErrors TextFunc_ConfigRead${_TEXTFUNC_S}_error
+ StrCpy $4 $3 $0
+ StrCmp${_TEXTFUNC_S} $4 $1 0 TextFunc_ConfigRead${_TEXTFUNC_S}_readnext
+ StrCpy $0 $3 '' $0
+ StrCpy $4 $0 1 -1
+ StrCmp${_TEXTFUNC_S} $4 '$\r' +2
+ StrCmp${_TEXTFUNC_S} $4 '$\n' 0 TextFunc_ConfigRead${_TEXTFUNC_S}_close
+ StrCpy $0 $0 -1
+ goto -4
+
+ TextFunc_ConfigRead${_TEXTFUNC_S}_error:
+ SetErrors
+ StrCpy $0 ''
+
+ TextFunc_ConfigRead${_TEXTFUNC_S}_close:
+ FileClose $2
+
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+!macroend
+
+!define ConfigRead `!insertmacro ConfigReadCall`
+!define un.ConfigRead `!insertmacro ConfigReadCall`
+
+!macro ConfigRead
+!macroend
+
+!macro un.ConfigRead
+!macroend
+
+!macro ConfigRead_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ !insertmacro ConfigReadBody ''
+
+ !verbose pop
+!macroend
+
+!define ConfigReadS `!insertmacro ConfigReadSCall`
+!define un.ConfigReadS `!insertmacro ConfigReadSCall`
+
+!macro ConfigReadS
+!macroend
+
+!macro un.ConfigReadS
+!macroend
+
+!macro ConfigReadS_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ !insertmacro ConfigReadBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro ConfigWriteBody _TEXTFUNC_S
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ ClearErrors
+
+ IfFileExists $0 0 TextFunc_ConfigWrite${_TEXTFUNC_S}_error
+ FileOpen $3 $0 a
+ IfErrors TextFunc_ConfigWrite${_TEXTFUNC_S}_error
+
+ StrLen $0 $1
+ StrCmp${_TEXTFUNC_S} $0 0 0 TextFunc_ConfigWrite${_TEXTFUNC_S}_readnext
+ StrCpy $0 ''
+ goto TextFunc_ConfigWrite${_TEXTFUNC_S}_close
+
+ TextFunc_ConfigWrite${_TEXTFUNC_S}_readnext:
+ FileRead $3 $4
+ IfErrors TextFunc_ConfigWrite${_TEXTFUNC_S}_add
+ StrCpy $5 $4 $0
+ StrCmp${_TEXTFUNC_S} $5 $1 0 TextFunc_ConfigWrite${_TEXTFUNC_S}_readnext
+
+ StrCpy $5 0
+ IntOp $5 $5 - 1
+ StrCpy $6 $4 1 $5
+ StrCmp${_TEXTFUNC_S} $6 '$\r' -2
+ StrCmp${_TEXTFUNC_S} $6 '$\n' -3
+ StrCpy $6 $4
+ StrCmp${_TEXTFUNC_S} $5 -1 +3
+ IntOp $5 $5 + 1
+ StrCpy $6 $4 $5
+
+ StrCmp${_TEXTFUNC_S} $2 '' TextFunc_ConfigWrite${_TEXTFUNC_S}_change
+ StrCmp${_TEXTFUNC_S} $6 '$1$2' 0 TextFunc_ConfigWrite${_TEXTFUNC_S}_change
+ StrCpy $0 SAME
+ goto TextFunc_ConfigWrite${_TEXTFUNC_S}_close
+
+ TextFunc_ConfigWrite${_TEXTFUNC_S}_change:
+ FileSeek $3 0 CUR $5
+ StrLen $4 $4
+ IntOp $4 $5 - $4
+ FileSeek $3 0 END $6
+ IntOp $6 $6 - $5
+
+ System::Alloc $6
+ Pop $0
+ FileSeek $3 $5 SET
+ System::Call 'kernel32::ReadFile(p r3, p r0, i $6, t.,)'
+ FileSeek $3 $4 SET
+ StrCmp${_TEXTFUNC_S} $2 '' +2
+ FileWrite $3 '$1$2$\r$\n'
+ System::Call 'kernel32::WriteFile(p r3, p r0, i $6, t.,)'
+ System::Call 'kernel32::SetEndOfFile(p r3)'
+ System::Free $0
+ StrCmp${_TEXTFUNC_S} $2 '' +3
+ StrCpy $0 CHANGED
+ goto TextFunc_ConfigWrite${_TEXTFUNC_S}_close
+ StrCpy $0 DELETED
+ goto TextFunc_ConfigWrite${_TEXTFUNC_S}_close
+
+ TextFunc_ConfigWrite${_TEXTFUNC_S}_add:
+ StrCmp${_TEXTFUNC_S} $2 '' 0 +3
+ StrCpy $0 SAME
+ goto TextFunc_ConfigWrite${_TEXTFUNC_S}_close
+ FileSeek $3 -1 END
+ FileRead $3 $4
+ IfErrors +4
+ StrCmp${_TEXTFUNC_S} $4 '$\r' +3
+ StrCmp${_TEXTFUNC_S} $4 '$\n' +2
+ FileWrite $3 '$\r$\n'
+ FileWrite $3 '$1$2$\r$\n'
+ StrCpy $0 ADDED
+
+ TextFunc_ConfigWrite${_TEXTFUNC_S}_close:
+ FileClose $3
+ goto TextFunc_ConfigWrite${_TEXTFUNC_S}_end
+
+ TextFunc_ConfigWrite${_TEXTFUNC_S}_error:
+ SetErrors
+ StrCpy $0 ''
+
+ TextFunc_ConfigWrite${_TEXTFUNC_S}_end:
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+!macroend
+
+!define ConfigWrite `!insertmacro ConfigWriteCall`
+!define un.ConfigWrite `!insertmacro ConfigWriteCall`
+
+!macro ConfigWrite
+!macroend
+
+!macro un.ConfigWrite
+!macroend
+
+!macro ConfigWrite_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ !insertmacro ConfigWriteBody ''
+
+ !verbose pop
+!macroend
+
+!define ConfigWriteS `!insertmacro ConfigWriteSCall`
+!define un.ConfigWriteS `!insertmacro ConfigWriteSCall`
+
+!macro ConfigWriteS
+!macroend
+
+!macro un.ConfigWriteS
+!macroend
+
+!macro ConfigWriteS_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ !insertmacro ConfigWriteBody 'S'
+
+ !verbose pop
+!macroend
+
+!define FileRecode `!insertmacro FileRecodeCall`
+!define un.FileRecode `!insertmacro FileRecodeCall`
+
+!macro FileRecode
+!macroend
+
+!macro un.FileRecode
+!macroend
+
+!macro FileRecode_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+
+ IfFileExists $0 0 TextFunc_FileRecode_error
+ StrCmp $1 OemToChar +2
+ StrCmp $1 CharToOem 0 TextFunc_FileRecode_error
+
+ FileOpen $2 $0 a
+ FileSeek $2 0 END $3
+ System::Alloc $3
+ Pop $4
+ FileSeek $2 0 SET
+ System::Call 'kernel32::ReadFile(p r2, p r4, i $3, t.,)'
+ System::Call 'user32::$1Buff(p r4, p r4, i $3)'
+ FileSeek $2 0 SET
+ System::Call 'kernel32::WriteFile(p r2, p r4, i $3, t.,)'
+ System::Free $4
+ FileClose $2
+ goto TextFunc_FileRecode_end
+
+ TextFunc_FileRecode_error:
+ SetErrors
+
+ TextFunc_FileRecode_end:
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ !verbose pop
+!macroend
+
+!define TrimNewLines `!insertmacro TrimNewLinesCall`
+!define un.TrimNewLines `!insertmacro TrimNewLinesCall`
+
+!macro TrimNewLines
+!macroend
+
+!macro un.TrimNewLines
+!macroend
+
+!macro TrimNewLines_
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+
+ Exch $0
+ Push $1
+ Push $2
+
+ StrCpy $1 0
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '$\r' -2
+ StrCmp $2 '$\n' -3
+ StrCmp $1 -1 +3
+ IntOp $1 $1 + 1
+ StrCpy $0 $0 $1
+
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!verbose pop
+!endif
diff --git a/KattekerCreator/nsis/Include/UpgradeDLL.nsh b/KattekerCreator/nsis/Include/UpgradeDLL.nsh
new file mode 100644
index 0000000..cfb2947
--- /dev/null
+++ b/KattekerCreator/nsis/Include/UpgradeDLL.nsh
@@ -0,0 +1,207 @@
+/*
+
+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
diff --git a/KattekerCreator/nsis/Include/Util.nsh b/KattekerCreator/nsis/Include/Util.nsh
new file mode 100644
index 0000000..30d03a5
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Util.nsh
@@ -0,0 +1,184 @@
+; ---------------------
+; Util.nsh
+; ---------------------
+;
+; Voodoo macros to make end-user usage easier. This may be documented someday.
+
+!verbose push 3
+!ifndef ___UTIL__NSH___
+!define ___UTIL__NSH___
+
+# CallArtificialFunction, see WinVer.nsh and *Func.nsh for usage examples
+!macro CallArtificialFunctionHelper TYPE NAME
+ !verbose pop
+ Call :.${NAME}${TYPE}
+ !ifndef ${NAME}${TYPE}_DEFINED
+ !verbose push 2
+ Goto ${NAME}${TYPE}_DONE
+ !define ${NAME}${TYPE}_DEFINED
+ !verbose pop
+ .${NAME}${TYPE}:
+ !insertmacro ${NAME}
+ Return
+ ${NAME}${TYPE}_DONE:
+ !endif
+ !verbose push 2
+!macroend
+
+!macro CallArtificialFunction NAME
+ !verbose push 2
+ !ifdef __UNINSTALL__
+ !insertmacro CallArtificialFunctionHelper uninst ${NAME}
+ !else
+ !insertmacro CallArtificialFunctionHelper inst ${NAME}
+ !endif
+ !verbose pop
+!macroend
+!define CallArtificialFunction `!insertmacro CallArtificialFunction`
+
+!macro CallArtificialFunction2 NAME ; Retained for v2.4x..v3.0b0 compatibility
+ ${CallArtificialFunction} ${NAME}
+!macroend
+!define CallArtificialFunction2 `!insertmacro CallArtificialFunction`
+
+
+!define Int32Op '!insertmacro Int32Op '
+!define Int64Op '!insertmacro Int64Op '
+!define IntPtrOp '!insertmacro IntPtrOp '
+!macro Int32Op r a o b
+IntOp `${r}` `${a}` `${o}` ${b}
+!macroend
+!macro Int64Op r a o b
+!echo "Int64Op ${r}=${a}${o}${b}"
+!verbose push 2
+System::Int64Op `${a}` `${o}` ${b}
+Pop ${r}
+!verbose pop
+!macroend
+!macro IntPtrOp r a o b
+IntPtrOp `${r}` `${a}` `${o}` `${b}`
+!macroend
+
+!define Int32Cmp '!insertmacro Int32Cmp '
+!define Int64Cmp '!insertmacro Int64Cmp '
+!define IntPtrCmp '!insertmacro IntPtrCmp '
+!macro Int32Cmp a b jeek jles jgtr
+IntCmp `${a}` `${b}` `${jeek}` `${jles}` `${jgtr}`
+!macroend
+!macro Int64Cmp a b jeek jles jgtr
+!if ${NSIS_PTR_SIZE} <= 4
+!ifmacrondef _LOGICLIB_TEMP
+!include LogicLib.nsh
+!endif
+!echo "Int64Cmp ${a}:${b} =${jeek}, <${jles}, >${jgtr}"
+!verbose push 2
+${IfThen} ${a} L= ${b} ${|} Goto ${jeek} ${|}
+!insertmacro _L< ${a} ${b} `${jles}` `${jgtr}`
+!verbose pop
+!else
+Int64Cmp `${a}` `${b}` `${jeek}` `${jles}` `${jgtr}`
+!endif
+!macroend
+!macro IntPtrCmp a b jeek jles jgtr
+IntPtrCmp `${a}` `${b}` `${jeek}` `${jles}` `${jgtr}`
+!macroend
+
+!define Int32CmpU '!insertmacro Int32CmpU '
+!define Int64CmpU '!insertmacro Int64CmpU '
+!define IntPtrCmpU '!insertmacro IntPtrCmpU '
+!macro Int32CmpU a b jeek jles jgtr
+IntCmpU `${a}` `${b}` `${jeek}` `${jles}` `${jgtr}`
+!macroend
+!macro Int64CmpUHelper
+; This macro performs "$_LOGICLIB_TEMP = a < b ? -1 : a > b ? 1 : 0" but System::Int64Op does not support unsigned operations so we have to perform multiple steps
+!ifmacrondef _LOGICLIB_TEMP
+!include LogicLib.nsh
+!endif
+!insertmacro _LOGICLIB_TEMP
+Exch $2 ; b
+Exch
+Exch $1 ; a
+; if (a == b) return 0;
+; if (a < 0)
+; {
+; if (b >= 0) return 1
+; }
+; else
+; {
+; if (b < 0) return -1
+; }
+; return a < b ? -1 : 1
+System::Int64Op $1 ^ $2 ; Using xor so $_LOGICLIB_TEMP ends up as 0 when they are equal
+Pop $_LOGICLIB_TEMP
+StrCmp $_LOGICLIB_TEMP 0 ret ; NOTE: Must use StrCmp, IntCmp fails on "0x8000000000000001 Z> 1"
+System::Int64Op $1 < 0
+Pop $_LOGICLIB_TEMP
+StrCmp $_LOGICLIB_TEMP 0 checkNegOther
+System::Int64Op $2 < 0 ; System::Int64Op does not support the >= operator so we invert the operation
+Pop $_LOGICLIB_TEMP
+StrCmp $_LOGICLIB_TEMP 0 retPos finalCmp
+retPos:
+StrCpy $_LOGICLIB_TEMP "1"
+Goto ret
+checkNegOther:
+System::Int64Op $2 < 0
+Pop $_LOGICLIB_TEMP
+StrCmp $_LOGICLIB_TEMP 0 finalCmp retNeg
+retNeg:
+StrCpy $_LOGICLIB_TEMP "-1"
+Goto ret
+finalCmp:
+System::Int64Op $1 < $2
+Pop $_LOGICLIB_TEMP
+StrCmp $_LOGICLIB_TEMP 0 retPos retNeg
+ret:
+Pop $1
+Pop $2
+!macroend
+!macro Int64CmpU a b jeek jles jgtr
+!if ${NSIS_PTR_SIZE} <= 4
+!echo "Int64CmpU ${a}:${b} =${jeek}, <${jles}, >${jgtr}"
+!verbose push 2
+Push `${a}`
+Push `${b}`
+!insertmacro CallArtificialFunction Int64CmpUHelper
+IntCmp $_LOGICLIB_TEMP 0 `${jeek}` `${jles}` `${jgtr}`
+!verbose pop
+!else
+Int64CmpU `${a}` `${b}` `${jeek}` `${jles}` `${jgtr}`
+!endif
+!macroend
+!macro IntPtrCmpU a b jeek jles jgtr
+IntPtrCmpU `${a}` `${b}` `${jeek}` `${jles}` `${jgtr}`
+!macroend
+
+
+!define MakeARPInstallDate "!insertmacro MakeARPInstallDate "
+!macro MakeARPInstallDate _outvar
+System::Call 'KERNEL32::GetDateFormat(i0x409,i0,p0,t"yyyyMMdd",t.s,i${NSIS_MAX_STRLEN})'
+Pop ${_outvar}
+!macroend
+
+
+!define /IfNDef SPI_GETHIGHCONTRAST 0x42
+!define /IfNDef HCF_HIGHCONTRASTON 0x01
+!define /IfNDef /math SYSSIZEOF_HIGHCONTRAST 8 + ${NSIS_PTR_SIZE}
+!define IsHighContrastModeActive '"" IsHighContrastModeActive ""'
+!macro _IsHighContrastModeActive _lhs _rhs _t _f
+!ifmacrondef _LOGICLIB_TEMP
+!include LogicLib.nsh
+!endif
+!insertmacro _LOGICLIB_TEMP
+Push $1
+System::Call '*(i${SYSSIZEOF_HIGHCONTRAST},i0,p)p.r1'
+System::Call 'USER32::SystemParametersInfo(i${SPI_GETHIGHCONTRAST},i${SYSSIZEOF_HIGHCONTRAST},pr1,i0)'
+System::Call '*$1(i,i.s)'
+Pop $_LOGICLIB_TEMP
+System::Free $1
+Pop $1
+!insertmacro _& $_LOGICLIB_TEMP ${HCF_HIGHCONTRASTON} `${_t}` `${_f}`
+!macroend
+
+
+!endif # !___UTIL__NSH___
+!verbose pop
diff --git a/KattekerCreator/nsis/Include/VB6RunTime.nsh b/KattekerCreator/nsis/Include/VB6RunTime.nsh
new file mode 100644
index 0000000..31f2562
--- /dev/null
+++ b/KattekerCreator/nsis/Include/VB6RunTime.nsh
@@ -0,0 +1,90 @@
+/*
+
+VB6RunTime.nsh
+
+Setup of Visual Basic 6.0 run-time files, including the Oleaut32.dll security update
+
+Copyright 2008-2018 Joost Verburg
+
+To obtain the run-time files, download and extract
+http://nsis.sourceforge.net/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
diff --git a/KattekerCreator/nsis/Include/VPatchLib.nsh b/KattekerCreator/nsis/Include/VPatchLib.nsh
new file mode 100644
index 0000000..1e01bc8
--- /dev/null
+++ b/KattekerCreator/nsis/Include/VPatchLib.nsh
@@ -0,0 +1,47 @@
+; 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
diff --git a/KattekerCreator/nsis/Include/Win/COM.nsh b/KattekerCreator/nsis/Include/Win/COM.nsh
new file mode 100644
index 0000000..6739995
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Win/COM.nsh
@@ -0,0 +1,264 @@
+/*
+-------------
+ 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 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_IPersistFile
+!define IID_IPersistFile {0000010b-0000-0000-C000-000000000046}
+${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 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 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
+
+!verbose pop
+!endif /* __WIN_COM__INC */
diff --git a/KattekerCreator/nsis/Include/Win/Propkey.nsh b/KattekerCreator/nsis/Include/Win/Propkey.nsh
new file mode 100644
index 0000000..fff6f0c
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Win/Propkey.nsh
@@ -0,0 +1,51 @@
+!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_I4 3
+!define VT_BSTR 8
+!define VT_BOOL 11
+!define VT_UI4 19
+!define VT_INT 22
+!define VT_UINT 23
+!define VT_HRESULT 25
+!define VT_PTR 26
+!define VT_SAFEARRAY 27
+!define VT_LPSTR 30
+!define VT_LPWSTR 31
+
+!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
+
+
+/**************************************************
+PropIdl.h
+**************************************************/
+!define SYSSIZEOF_PROPVARIANT 16
+!define SYSSTRUCT_PROPVARIANT (&i2,&i6,&i8)
+
+
+/**************************************************
+Propkey.h
+**************************************************/
+!define PKEY_AppUserModel_ID '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",5'
+!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 APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL 1
+!define APPUSERMODEL_STARTPINOPTION_USERPINNED 2
+!define PKEY_AppUserModel_StartPinOption '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",12' ; VT_UI4 [Eight+]
+
+
+!verbose pop
+!endif /* __WIN_PROPKEY__INC */
diff --git a/KattekerCreator/nsis/Include/Win/WinDef.nsh b/KattekerCreator/nsis/Include/Win/WinDef.nsh
new file mode 100644
index 0000000..a91d685
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Win/WinDef.nsh
@@ -0,0 +1,67 @@
+!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 */
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/Win/WinError.nsh b/KattekerCreator/nsis/Include/Win/WinError.nsh
new file mode 100644
index 0000000..988c9eb
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Win/WinError.nsh
@@ -0,0 +1,64 @@
+!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 SEVERITY_SUCCESS 0
+!define SEVERITY_ERROR 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 */
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/Win/WinNT.nsh b/KattekerCreator/nsis/Include/Win/WinNT.nsh
new file mode 100644
index 0000000..09e9aaf
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Win/WinNT.nsh
@@ -0,0 +1,224 @@
+!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 */
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/Win/WinUser.nsh b/KattekerCreator/nsis/Include/Win/WinUser.nsh
new file mode 100644
index 0000000..50a9921
--- /dev/null
+++ b/KattekerCreator/nsis/Include/Win/WinUser.nsh
@@ -0,0 +1,199 @@
+!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 */
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/WinCore.nsh b/KattekerCreator/nsis/Include/WinCore.nsh
new file mode 100644
index 0000000..b062b50
--- /dev/null
+++ b/KattekerCreator/nsis/Include/WinCore.nsh
@@ -0,0 +1,231 @@
+/*
+
+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 ;\Favorites
+!define CSIDL_STARTUP 0x0007 ;Start Menu\Programs\Startup
+!define CSIDL_RECENT 0x0008 ;\Recent
+!define CSIDL_SENDTO 0x0009 ;\SendTo
+!define CSIDL_BITBUCKET 0x000a ;\Recycle Bin
+!define CSIDL_STARTMENU 0x000b ;\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 ;\Desktop
+!define CSIDL_DRIVES 0x0011 ;My Computer
+!define CSIDL_NETWORK 0x0012 ;Network Neighborhood
+!define CSIDL_NETHOOD 0x0013 ;\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 ;\Application Data
+!define CSIDL_PRINTHOOD 0x001b ;\PrintHood
+!define CSIDL_LOCAL_APPDATA 0x001c ;\Local Settings\Applicaiton 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 ;\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 Direcotry
+!define CSIDL_RESOURCES_LOCALIZED 0x0039 ;Localized Resource Direcotry
+!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 */
+
+
+
+!verbose pop
+!endif /* __WIN_WINDOWS__INC */
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/WinMessages.nsh b/KattekerCreator/nsis/Include/WinMessages.nsh
new file mode 100644
index 0000000..08c038a
--- /dev/null
+++ b/KattekerCreator/nsis/Include/WinMessages.nsh
@@ -0,0 +1,827 @@
+/*
+_____________________________________________________________________________
+
+ List of common Windows Messages
+_____________________________________________________________________________
+
+ 2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+
+Usage example:
+---------------------------------------------------
+Name "Output"
+OutFile "Output.exe"
+
+!include "WinMessages.nsh"
+
+Section
+ FindWindow $0 '#32770' '' $HWNDPARENT
+ GetDlgItem $1 $0 1027
+ SendMessage $1 ${WM_SETTEXT} 0 'STR:MyText'
+SectionEnd
+---------------------------------------------------
+
+
+Prefix Message category
+-------------------------
+SW ShowWindow Commands
+CCM Generic Common Control
+BM Button control
+CB Combo box control
+EM Edit control
+LB List box control
+WM General window
+ABM Application desktop toolbar
+DBT Device
+DM Default push button control
+HDM Header control
+LVM List view control
+SB Status bar window
+SBM Scroll bar control
+STM Static control
+TCM Tab control
+PBM Progress bar
+ACM Animation control
+TBM Track bar
+UDM Up-down control
+HKM Hot key control
+IPM IP address control
+-----------------------------------
+
+NOT included messages (WM_USER + X)
+-----------------------------------
+CBEM Extended combo box control
+CDM Common dialog box
+DL Drag list box
+DTM Date and time picker control
+MCM Month calendar control
+PGM Pager control
+PSM Property sheet
+RB Rebar control
+TB Toolbar
+TTM Tooltip control
+TVM Tree-view control
+-----------------------------------
+*/
+
+
+!ifndef WINMESSAGES_INCLUDED
+!define WINMESSAGES_INCLUDED
+!verbose push
+!verbose 3
+
+!define _NSIS_DEFAW '!insertmacro _NSIS_DEFAW '
+!macro _NSIS_DEFAW d
+!ifdef NSIS_UNICODE
+!define ${d} "${${d}W}"
+!else
+!define ${d} "${${d}A}"
+!endif
+!macroend
+
+!define HWND_BROADCAST 0xFFFF
+
+#ShowWindow Commands#
+!define SW_HIDE 0
+!define SW_SHOWNORMAL 1
+!define SW_NORMAL 1
+!define SW_SHOWMINIMIZED 2
+!define SW_SHOWMAXIMIZED 3
+!define SW_MAXIMIZE 3
+!define SW_SHOWNOACTIVATE 4
+!define SW_SHOW 5
+!define SW_MINIMIZE 6
+!define SW_SHOWMINNOACTIVE 7
+!define SW_SHOWNA 8
+!define SW_RESTORE 9
+!define SW_SHOWDEFAULT 10
+!define SW_FORCEMINIMIZE 11
+!define SW_MAX 11
+
+#Generic Common Control Messages#
+!define CCM_FIRST 0x2000
+!define /math CCM_SETBKCOLOR ${CCM_FIRST} + 0x1 ; IE4
+!define /math CCM_SETUNICODEFORMAT ${CCM_FIRST} + 0x5
+!define /math CCM_GETUNICODEFORMAT ${CCM_FIRST} + 0x6
+!define /math CCM_SETVERSION ${CCM_FIRST} + 0x7 ; IE5
+!define /math CCM_GETVERSION ${CCM_FIRST} + 0x8
+!define /math CCM_SETWINDOWTHEME ${CCM_FIRST} + 0xB ; WinXP
+!define /math CCM_DPISCALE ${CCM_FIRST} + 0xC
+!define WM_USER 0x400
+
+!define CCS_TOP 1
+!define CCS_BOTTOM 3
+!define CCS_NODIVIDER 64
+!define CCS_LEFT 129
+!define CCS_RIGHT 131
+
+!define I_IMAGENONE -2
+
+#Button Control Messages#
+!define BM_CLICK 0x00F5
+!define BM_GETCHECK 0x00F0
+!define BM_GETIMAGE 0x00F6
+!define BM_GETSTATE 0x00F2
+!define BM_SETCHECK 0x00F1
+!define BM_SETIMAGE 0x00F7
+!define BM_SETSTATE 0x00F3
+!define BM_SETSTYLE 0x00F4
+!define BCM_SETSHIELD 0x160C ; WinVista + ComCtl32 v6
+
+!define BST_UNCHECKED 0
+!define BST_CHECKED 1
+!define BST_INDETERMINATE 2
+!define BST_PUSHED 4
+!define BST_FOCUS 8
+
+#Combo Box Messages#
+!define CB_ADDSTRING 0x0143
+!define CB_DELETESTRING 0x0144
+!define CB_DIR 0x0145
+!define CB_FINDSTRING 0x014C
+!define CB_FINDSTRINGEXACT 0x0158
+!define CB_GETCOUNT 0x0146
+!define CB_GETCURSEL 0x0147
+!define CB_GETDROPPEDCONTROLRECT 0x0152
+!define CB_GETDROPPEDSTATE 0x0157
+!define CB_GETDROPPEDWIDTH 0x015f
+!define CB_GETEDITSEL 0x0140
+!define CB_GETEXTENDEDUI 0x0156
+!define CB_GETHORIZONTALEXTENT 0x015d
+!define CB_GETITEMDATA 0x0150
+!define CB_GETITEMHEIGHT 0x0154
+!define CB_GETLBTEXT 0x0148
+!define CB_GETLBTEXTLEN 0x0149
+!define CB_GETLOCALE 0x015A
+!define CB_GETTOPINDEX 0x015b
+!define CB_INITSTORAGE 0x0161
+!define CB_INSERTSTRING 0x014A
+!define CB_LIMITTEXT 0x0141
+!define CB_MSGMAX 0x015B # 0x0162 0x0163
+!define CB_MULTIPLEADDSTRING 0x0163
+!define CB_RESETCONTENT 0x014B
+!define CB_SELECTSTRING 0x014D
+!define CB_SETCURSEL 0x014E
+!define CB_SETDROPPEDWIDTH 0x0160
+!define CB_SETEDITSEL 0x0142
+!define CB_SETEXTENDEDUI 0x0155
+!define CB_SETHORIZONTALEXTENT 0x015e
+!define CB_SETITEMDATA 0x0151
+!define CB_SETITEMHEIGHT 0x0153
+!define CB_SETLOCALE 0x0159
+!define CB_SETTOPINDEX 0x015c
+!define CB_SHOWDROPDOWN 0x014F
+!define CBM_FIRST 0x1700 ; Vista+
+!define /math CB_SETMINVISIBLE ${CBM_FIRST} + 1
+!define /math CB_GETMINVISIBLE ${CBM_FIRST} + 2
+!define /math CB_SETCUEBANNER ${CBM_FIRST} + 3
+!define /math CB_GETCUEBANNER ${CBM_FIRST} + 4
+
+!define CB_ERR -1
+
+#Edit Control Messages#
+!define EM_CANUNDO 0x00C6
+!define EM_CHARFROMPOS 0x00D7
+!define EM_EMPTYUNDOBUFFER 0x00CD
+!define EM_FMTLINES 0x00C8
+!define EM_GETFIRSTVISIBLELINE 0x00CE
+!define EM_GETHANDLE 0x00BD
+!define EM_GETIMESTATUS 0x00D9
+!define EM_GETLIMITTEXT 0x00D5
+!define EM_GETLINE 0x00C4
+!define EM_GETLINECOUNT 0x00BA
+!define EM_GETMARGINS 0x00D4
+!define EM_GETMODIFY 0x00B8
+!define EM_GETPASSWORDCHAR 0x00D2
+!define EM_GETRECT 0x00B2
+!define EM_GETSEL 0x00B0
+!define EM_GETTHUMB 0x00BE
+!define EM_GETWORDBREAKPROC 0x00D1
+!define EM_LIMITTEXT 0x00C5
+!define EM_LINEFROMCHAR 0x00C9
+!define EM_LINEINDEX 0x00BB
+!define EM_LINELENGTH 0x00C1
+!define EM_LINESCROLL 0x00B6
+!define EM_POSFROMCHAR 0x00D6
+!define EM_REPLACESEL 0x00C2
+!define EM_SCROLL 0x00B5
+!define EM_SCROLLCARET 0x00B7
+!define EM_SETHANDLE 0x00BC
+!define EM_SETIMESTATUS 0x00D8
+!define EM_SETLIMITTEXT 0x00C5 # Same as EM_LIMITTEXT
+!define EM_SETMARGINS 0x00D3
+!define EM_SETMODIFY 0x00B9
+!define EM_SETPASSWORDCHAR 0x00CC
+!define EM_SETREADONLY 0x00CF
+!define EM_SETRECT 0x00B3
+!define EM_SETRECTNP 0x00B4
+!define EM_SETSEL 0x00B1
+!define EM_SETTABSTOPS 0x00CB
+!define EM_SETWORDBREAKPROC 0x00D0
+!define EM_UNDO 0x00C7
+!define ECM_FIRST 0x1500 ; CC6+
+!define /math EM_SETCUEBANNER ${ECM_FIRST} + 1
+
+#RichEdit Messages#
+!define /math EM_EXGETSEL ${WM_USER} + 52
+!define /math EM_EXLIMITTEXT ${WM_USER} + 53
+!define /math EM_EXLINEFROMCHAR ${WM_USER} + 54
+!define /math EM_GETEVENTMASK ${WM_USER} + 59
+!define /math EM_GETOLEINTERFACE ${WM_USER} + 60
+!define /math EM_HIDESELECTION ${WM_USER} + 63
+!define /math EM_SETBKGNDCOLOR ${WM_USER} + 67
+!define /math EM_SETEVENTMASK ${WM_USER} + 69
+!define /math EM_STREAMIN ${WM_USER} + 73
+!define /math EM_STREAMOUT ${WM_USER} + 74
+!define /math EM_GETTEXTRANGE ${WM_USER} + 75
+!define /math EM_SETOPTIONS ${WM_USER} + 77
+!define /math EM_GETOPTIONS ${WM_USER} + 78
+!define /math EM_SETUNDOLIMIT ${WM_USER} + 82 ; v2+
+!define /math EM_AUTOURLDETECT ${WM_USER} + 91
+!define /math EM_SETEDITSTYLE ${WM_USER} + 204 ; v3+
+!define /math EM_SETFONTSIZE ${WM_USER} + 223
+
+!define EN_MSGFILTER 0x0700
+!define EN_SELCHANGE 0x0702
+!define EN_LINK 0x070b
+
+!define ENM_NONE 0x00000000
+!define ENM_CHANGE 0x00000001
+!define ENM_UPDATE 0x00000002
+!define ENM_SCROLL 0x00000004
+!define ENM_SCROLLEVENTS 0x00000008
+!define ENM_KEYEVENTS 0x00010000
+!define ENM_MOUSEEVENTS 0x00020000
+!define ENM_SELCHANGE 0x00080000
+!define ENM_LINK 0x04000000 ; v2+
+
+#Listbox Messages#
+!define LB_ADDFILE 0x0196
+!define LB_ADDSTRING 0x0180
+!define LB_DELETESTRING 0x0182
+!define LB_DIR 0x018D
+!define LB_FINDSTRING 0x018F
+!define LB_FINDSTRINGEXACT 0x01A2
+!define LB_GETANCHORINDEX 0x019D
+!define LB_GETCARETINDEX 0x019F
+!define LB_GETCOUNT 0x018B
+!define LB_GETCURSEL 0x0188
+!define LB_GETHORIZONTALEXTENT 0x0193
+!define LB_GETITEMDATA 0x0199
+!define LB_GETITEMHEIGHT 0x01A1
+!define LB_GETITEMRECT 0x0198
+!define LB_GETLOCALE 0x01A6
+!define LB_GETSEL 0x0187
+!define LB_GETSELCOUNT 0x0190
+!define LB_GETSELITEMS 0x0191
+!define LB_GETTEXT 0x0189
+!define LB_GETTEXTLEN 0x018A
+!define LB_GETTOPINDEX 0x018E
+!define LB_INITSTORAGE 0x01A8
+!define LB_INSERTSTRING 0x0181
+!define LB_ITEMFROMPOINT 0x01A9
+!define LB_MSGMAX 0x01A8 # 0x01B0 0x01B1
+!define LB_MULTIPLEADDSTRING 0x01B1
+!define LB_RESETCONTENT 0x0184
+!define LB_SELECTSTRING 0x018C
+!define LB_SELITEMRANGE 0x019B
+!define LB_SELITEMRANGEEX 0x0183
+!define LB_SETANCHORINDEX 0x019C
+!define LB_SETCARETINDEX 0x019E
+!define LB_SETCOLUMNWIDTH 0x0195
+!define LB_SETCOUNT 0x01A7
+!define LB_SETCURSEL 0x0186
+!define LB_SETHORIZONTALEXTENT 0x0194
+!define LB_SETITEMDATA 0x019A
+!define LB_SETITEMHEIGHT 0x01A0
+!define LB_SETLOCALE 0x01A5
+!define LB_SETSEL 0x0185
+!define LB_SETTABSTOPS 0x0192
+!define LB_SETTOPINDEX 0x0197
+
+!define LB_ERR -1
+
+#Window Messages#
+!define WM_ACTIVATE 0x0006
+!define WM_ACTIVATEAPP 0x001C
+!define WM_AFXFIRST 0x0360
+!define WM_AFXLAST 0x037F
+!define WM_APP 0x8000
+!define WM_APPCOMMAND 0x0319
+!define WM_ASKCBFORMATNAME 0x030C
+!define WM_CANCELJOURNAL 0x004B
+!define WM_CANCELMODE 0x001F
+!define WM_CAPTURECHANGED 0x0215
+!define WM_CHANGECBCHAIN 0x030D
+!define WM_CHANGEUISTATE 0x0127
+!define WM_CHAR 0x0102
+!define WM_CHARTOITEM 0x002F
+!define WM_CHILDACTIVATE 0x0022
+!define WM_CLEAR 0x0303
+!define WM_CLOSE 0x0010
+!define WM_COMMAND 0x0111
+!define WM_COMMNOTIFY 0x0044 # no longer suported
+!define WM_COMPACTING 0x0041
+!define WM_COMPAREITEM 0x0039
+!define WM_CONTEXTMENU 0x007B
+!define WM_CONVERTREQUESTEX 0x108
+!define WM_COPY 0x0301
+!define WM_COPYDATA 0x004A
+!define WM_CREATE 0x0001
+!define WM_CTLCOLOR 0x0019
+!define WM_CTLCOLORBTN 0x0135
+!define WM_CTLCOLORDLG 0x0136
+!define WM_CTLCOLOREDIT 0x0133
+!define WM_CTLCOLORLISTBOX 0x0134
+!define WM_CTLCOLORMSGBOX 0x0132
+!define WM_CTLCOLORSCROLLBAR 0x0137
+!define WM_CTLCOLORSTATIC 0x0138
+!define WM_CUT 0x0300
+!define WM_DDE_FIRST 0x3E0
+!define WM_DEADCHAR 0x0103
+!define WM_DELETEITEM 0x002D
+!define WM_DESTROY 0x0002
+!define WM_DESTROYCLIPBOARD 0x0307
+!define WM_DEVICECHANGE 0x0219
+!define WM_DEVMODECHANGE 0x001B
+!define WM_DISPLAYCHANGE 0x007E
+!define WM_DRAWCLIPBOARD 0x0308
+!define WM_DRAWITEM 0x002B
+!define WM_DROPFILES 0x0233
+!define WM_ENABLE 0x000A
+!define WM_ENDSESSION 0x0016
+!define WM_ENTERIDLE 0x0121
+!define WM_ENTERMENULOOP 0x0211
+!define WM_ENTERSIZEMOVE 0x0231
+!define WM_ERASEBKGND 0x0014
+!define WM_EXITMENULOOP 0x0212
+!define WM_EXITSIZEMOVE 0x0232
+!define WM_FONTCHANGE 0x001D
+!define WM_GETDLGCODE 0x0087
+!define WM_GETFONT 0x0031
+!define WM_GETHOTKEY 0x0033
+!define WM_GETICON 0x007F
+!define WM_GETMINMAXINFO 0x0024
+!define WM_GETOBJECT 0x003D
+!define WM_GETTEXT 0x000D
+!define WM_GETTEXTLENGTH 0x000E
+!define WM_HANDHELDFIRST 0x0358
+!define WM_HANDHELDLAST 0x035F
+!define WM_HELP 0x0053
+!define WM_HOTKEY 0x0312
+!define WM_HSCROLL 0x0114
+!define WM_HSCROLLCLIPBOARD 0x030E
+!define WM_ICONERASEBKGND 0x0027
+!define WM_IME_CHAR 0x0286
+!define WM_IME_COMPOSITION 0x010F
+!define WM_IME_COMPOSITIONFULL 0x0284
+!define WM_IME_CONTROL 0x0283
+!define WM_IME_ENDCOMPOSITION 0x010E
+!define WM_IME_KEYDOWN 0x0290
+!define WM_IME_KEYLAST 0x010F
+!define WM_IME_KEYUP 0x0291
+!define WM_IME_NOTIFY 0x0282
+!define WM_IME_REQUEST 0x0288
+!define WM_IME_SELECT 0x0285
+!define WM_IME_SETCONTEXT 0x0281
+!define WM_IME_STARTCOMPOSITION 0x010D
+!define WM_INITDIALOG 0x0110
+!define WM_INITMENU 0x0116
+!define WM_INITMENUPOPUP 0x0117
+!define WM_INPUT 0x00FF
+!define WM_INPUTLANGCHANGE 0x0051
+!define WM_INPUTLANGCHANGEREQUEST 0x0050
+!define WM_KEYDOWN 0x0100
+!define WM_KEYFIRST 0x0100
+!define WM_KEYLAST 0x0108
+!define WM_KEYUP 0x0101
+!define WM_KILLFOCUS 0x0008
+!define WM_LBUTTONDBLCLK 0x0203
+!define WM_LBUTTONDOWN 0x0201
+!define WM_LBUTTONUP 0x0202
+!define WM_MBUTTONDBLCLK 0x0209
+!define WM_MBUTTONDOWN 0x0207
+!define WM_MBUTTONUP 0x0208
+!define WM_MDIACTIVATE 0x0222
+!define WM_MDICASCADE 0x0227
+!define WM_MDICREATE 0x0220
+!define WM_MDIDESTROY 0x0221
+!define WM_MDIGETACTIVE 0x0229
+!define WM_MDIICONARRANGE 0x0228
+!define WM_MDIMAXIMIZE 0x0225
+!define WM_MDINEXT 0x0224
+!define WM_MDIREFRESHMENU 0x0234
+!define WM_MDIRESTORE 0x0223
+!define WM_MDISETMENU 0x0230
+!define WM_MDITILE 0x0226
+!define WM_MEASUREITEM 0x002C
+!define WM_MENUCHAR 0x0120
+!define WM_MENUCOMMAND 0x0126
+!define WM_MENUDRAG 0x0123
+!define WM_MENUGETOBJECT 0x0124
+!define WM_MENURBUTTONUP 0x0122
+!define WM_MENUSELECT 0x011F
+!define WM_MOUSEACTIVATE 0x0021
+!define WM_MOUSEFIRST 0x0200
+!define WM_MOUSEHOVER 0x02A1
+!define WM_MOUSELAST 0x0209 # 0x020A 0x020D
+!define WM_MOUSELEAVE 0x02A3
+!define WM_MOUSEMOVE 0x0200
+!define WM_MOUSEWHEEL 0x020A
+!define WM_MOVE 0x0003
+!define WM_MOVING 0x0216
+!define WM_NCACTIVATE 0x0086
+!define WM_NCCALCSIZE 0x0083
+!define WM_NCCREATE 0x0081
+!define WM_NCDESTROY 0x0082
+!define WM_NCHITTEST 0x0084
+!define WM_NCLBUTTONDBLCLK 0x00A3
+!define WM_NCLBUTTONDOWN 0x00A1
+!define WM_NCLBUTTONUP 0x00A2
+!define WM_NCMBUTTONDBLCLK 0x00A9
+!define WM_NCMBUTTONDOWN 0x00A7
+!define WM_NCMBUTTONUP 0x00A8
+!define WM_NCMOUSEHOVER 0x02A0
+!define WM_NCMOUSELEAVE 0x02A2
+!define WM_NCMOUSEMOVE 0x00A0
+!define WM_NCPAINT 0x0085
+!define WM_NCRBUTTONDBLCLK 0x00A6
+!define WM_NCRBUTTONDOWN 0x00A4
+!define WM_NCRBUTTONUP 0x00A5
+!define WM_NCXBUTTONDBLCLK 0x00AD
+!define WM_NCXBUTTONDOWN 0x00AB
+!define WM_NCXBUTTONUP 0x00AC
+!define WM_NEXTDLGCTL 0x0028
+!define WM_NEXTMENU 0x0213
+!define WM_NOTIFY 0x004E
+!define WM_NOTIFYFORMAT 0x0055
+!define WM_NULL 0x0000
+!define WM_PAINT 0x000F
+!define WM_PAINTCLIPBOARD 0x0309
+!define WM_PAINTICON 0x0026
+!define WM_PALETTECHANGED 0x0311
+!define WM_PALETTEISCHANGING 0x0310
+!define WM_PARENTNOTIFY 0x0210
+!define WM_PASTE 0x0302
+!define WM_PENWINFIRST 0x0380
+!define WM_PENWINLAST 0x038F
+!define WM_POWER 0x0048
+!define WM_POWERBROADCAST 0x0218
+!define WM_PRINT 0x0317
+!define WM_PRINTCLIENT 0x0318
+!define WM_QUERYDRAGICON 0x0037
+!define WM_QUERYENDSESSION 0x0011
+!define WM_QUERYNEWPALETTE 0x030F
+!define WM_QUERYOPEN 0x0013
+!define WM_QUERYUISTATE 0x0129
+!define WM_QUEUESYNC 0x0023
+!define WM_QUIT 0x0012
+!define WM_RBUTTONDBLCLK 0x0206
+!define WM_RBUTTONDOWN 0x0204
+!define WM_RBUTTONUP 0x0205
+!define WM_RASDIALEVENT 0xCCCD
+!define WM_RENDERALLFORMATS 0x0306
+!define WM_RENDERFORMAT 0x0305
+!define WM_SETCURSOR 0x0020
+!define WM_SETFOCUS 0x0007
+!define WM_SETFONT 0x0030
+!define WM_SETHOTKEY 0x0032
+!define WM_SETICON 0x0080
+!define WM_SETREDRAW 0x000B
+!define WM_SETTEXT 0x000C
+!define WM_SETTINGCHANGE 0x001A # Same as WM_WININICHANGE
+!define WM_SHOWWINDOW 0x0018
+!define WM_SIZE 0x0005
+!define WM_SIZECLIPBOARD 0x030B
+!define WM_SIZING 0x0214
+!define WM_SPOOLERSTATUS 0x002A
+!define WM_STYLECHANGED 0x007D
+!define WM_STYLECHANGING 0x007C
+!define WM_SYNCPAINT 0x0088
+!define WM_SYSCHAR 0x0106
+!define WM_SYSCOLORCHANGE 0x0015
+!define WM_SYSCOMMAND 0x0112
+!define WM_SYSDEADCHAR 0x0107
+!define WM_SYSKEYDOWN 0x0104
+!define WM_SYSKEYUP 0x0105
+!define WM_TABLET_FIRST 0x02C0
+!define WM_TABLET_LAST 0x02DF
+!define WM_THEMECHANGED 0x031A
+!define WM_TCARD 0x0052
+!define WM_TIMECHANGE 0x001E
+!define WM_TIMER 0x0113
+!define WM_UNDO 0x0304
+!define WM_UNICHAR 0x0109
+!define WM_UNINITMENUPOPUP 0x0125
+!define WM_UPDATEUISTATE 0x0128
+!define WM_USERCHANGED 0x0054
+!define WM_VKEYTOITEM 0x002E
+!define WM_VSCROLL 0x0115
+!define WM_VSCROLLCLIPBOARD 0x030A
+!define WM_WINDOWPOSCHANGED 0x0047
+!define WM_WINDOWPOSCHANGING 0x0046
+!define WM_WININICHANGE 0x001A
+!define WM_WTSSESSION_CHANGE 0x02B1
+!define WM_XBUTTONDBLCLK 0x020D
+!define WM_XBUTTONDOWN 0x020B
+!define WM_XBUTTONUP 0x020C
+
+
+#Application desktop toolbar#
+!define ABM_ACTIVATE 0x00000006 # lParam == TRUE/FALSE means activate/deactivate
+!define ABM_GETAUTOHIDEBAR 0x00000007
+!define ABM_GETSTATE 0x00000004
+!define ABM_GETTASKBARPOS 0x00000005
+!define ABM_NEW 0x00000000
+!define ABM_QUERYPOS 0x00000002
+!define ABM_REMOVE 0x00000001
+!define ABM_SETAUTOHIDEBAR 0x00000008 # This can fail, you MUST check the result
+!define ABM_SETPOS 0x00000003
+!define ABM_WINDOWPOSCHANGED 0x0000009
+
+#Device#
+!define DBT_APPYBEGIN 0x0000
+!define DBT_APPYEND 0x0001
+!define DBT_CONFIGCHANGECANCELED 0x0019
+!define DBT_CONFIGCHANGED 0x0018
+!define DBT_CONFIGMGAPI32 0x0022
+!define DBT_CONFIGMGPRIVATE 0x7FFF
+!define DBT_CUSTOMEVENT 0x8006 # User-defined event
+!define DBT_DEVICEARRIVAL 0x8000 # System detected a new device
+!define DBT_DEVICEQUERYREMOVE 0x8001 # Wants to remove, may fail
+!define DBT_DEVICEQUERYREMOVEFAILED 0x8002 # Removal aborted
+!define DBT_DEVICEREMOVECOMPLETE 0x8004 # Device is gone
+!define DBT_DEVICEREMOVEPENDING 0x8003 # About to remove, still avail.
+!define DBT_DEVICETYPESPECIFIC 0x8005 # Type specific event
+!define DBT_DEVNODES_CHANGED 0x0007
+!define DBT_DEVTYP_DEVICEINTERFACE 0x00000005 # Device interface class
+!define DBT_DEVTYP_DEVNODE 0x00000001 # Devnode number
+!define DBT_DEVTYP_HANDLE 0x00000006 # File system handle
+!define DBT_DEVTYP_NET 0x00000004 # Network resource
+!define DBT_DEVTYP_OEM 0x00000000 # Oem-defined device type
+!define DBT_DEVTYP_PORT 0x00000003 # Serial, parallel
+!define DBT_DEVTYP_VOLUME 0x00000002 # Logical volume
+!define DBT_LOW_DISK_SPACE 0x0048
+!define DBT_MONITORCHANGE 0x001B
+!define DBT_NO_DISK_SPACE 0x0047
+!define DBT_QUERYCHANGECONFIG 0x0017
+!define DBT_SHELLLOGGEDON 0x0020
+!define DBT_USERDEFINED 0xFFFF
+!define DBT_VOLLOCKLOCKFAILED 0x8043
+!define DBT_VOLLOCKLOCKRELEASED 0x8045
+!define DBT_VOLLOCKLOCKTAKEN 0x8042
+!define DBT_VOLLOCKQUERYLOCK 0x8041
+!define DBT_VOLLOCKQUERYUNLOCK 0x8044
+!define DBT_VOLLOCKUNLOCKFAILED 0x8046
+!define DBT_VPOWERDAPI 0x8100 # VPOWERD API for Win95
+!define DBT_VXDINITCOMPLETE 0x0023
+
+#Default push button control#
+!define DM_BITSPERPEL 0x00040000
+!define DM_COLLATE 0x00008000
+!define DM_COLOR 0x00000800
+!define DM_COPIES 0x00000100
+!define DM_DEFAULTSOURCE 0x00000200
+!define DM_DISPLAYFLAGS 0x00200000
+!define DM_DISPLAYFREQUENCY 0x00400000
+!define DM_DITHERTYPE 0x04000000
+!define DM_DUPLEX 0x00001000
+!define DM_FORMNAME 0x00010000
+!define DM_GRAYSCALE 0x00000001 # This flag is no longer valid
+!define DM_ICMINTENT 0x01000000
+!define DM_ICMMETHOD 0x00800000
+!define DM_INTERLACED 0x00000002 # This flag is no longer valid
+!define DM_LOGPIXELS 0x00020000
+!define DM_MEDIATYPE 0x02000000
+!define DM_NUP 0x00000040
+!define DM_ORIENTATION 0x00000001
+!define DM_PANNINGHEIGHT 0x10000000
+!define DM_PANNINGWIDTH 0x08000000
+!define DM_PAPERLENGTH 0x00000004
+!define DM_PAPERSIZE 0x00000002
+!define DM_PAPERWIDTH 0x00000008
+!define DM_PELSHEIGHT 0x00100000
+!define DM_PELSWIDTH 0x00080000
+!define DM_POSITION 0x00000020
+!define DM_PRINTQUALITY 0x00000400
+!define DM_SCALE 0x00000010
+!define DM_SPECVERSION 0x0320 # 0x0400 0x0401
+!define DM_TTOPTION 0x00004000
+!define DM_YRESOLUTION 0x00002000
+
+#Header control#
+!define HDM_FIRST 0x1200
+
+#List view control#
+!define LVS_SINGLESEL 4
+!define LVS_SHOWSELALWAYS 8
+!define LVS_SORTASCENDING 0x10
+!define LVS_SORTDESCENDING 0x20
+!define LVS_SHAREIMAGELISTS 0x40
+!define LVS_EDITLABELS 0x200
+!define LVS_NOSCROLL 0x2000
+!define LVS_NOCOLUMNHEADER 0x4000
+!define LVS_NOSORTHEADER 0x8000
+!define LVS_ICON 0
+!define LVS_REPORT 1
+!define LVS_SMALLICON 2
+!define LVS_LIST 3
+!define LVS_EX_CHECKBOXES 4
+!define LVS_EX_FULLROWSELECT 0x20
+!define LVS_EX_INFOTIP 0x400
+!define LVS_EX_LABELTIP 0x4000
+!define LVS_EX_DOUBLEBUFFER 0x10000
+!define LVIF_TEXT 1
+!define LVIF_IMAGE 2
+!define LVIF_PARAM 4
+!define LVIF_STATE 8
+!define LVIS_STATEIMAGEMASK 0xF000
+!define LVCF_FMT 1
+!define LVCF_WIDTH 2
+!define LVCF_TEXT 4
+!define LVCF_SUBITEM 8
+!define SYSSTRUCT_LVITEM_V1 (i,i,i,i,&i${NSIS_PTR_SIZE},t,i,i,p)
+!define SYSSTRUCT_LVITEM_V2 (i,i,i,i,&i${NSIS_PTR_SIZE},t,i,i,p,i) ; IE3
+!define SYSSTRUCT_LVITEM_V3 (i,i,i,i,&i${NSIS_PTR_SIZE},t,i,i,p,i,i,i,i) ; WinXP + ComCtl32 v6
+!define SYSSTRUCT_LVITEM_V4 (i,i,i,i,&i${NSIS_PTR_SIZE},t,i,i,p,i,i,i,i,i,i) ; WinVista + ComCtl32 v6
+!define LVSCW_AUTOSIZE -1
+!define LVSCW_AUTOSIZE_USEHEADER -2
+!define LVM_FIRST 0x00001000
+!define /math LVM_GETIMAGELIST ${LVM_FIRST} + 2
+!define /math LVM_SETIMAGELIST ${LVM_FIRST} + 3
+!define /math LVM_GETITEMCOUNT ${LVM_FIRST} + 4
+!define /math LVM_GETITEMA ${LVM_FIRST} + 5
+!define /math LVM_SETITEMA ${LVM_FIRST} + 6
+!define /math LVM_INSERTITEMA ${LVM_FIRST} + 7
+!define /math LVM_DELETEITEM ${LVM_FIRST} + 8
+!define /math LVM_DELETEALLITEMS ${LVM_FIRST} + 9
+!define /math LVM_INSERTCOLUMNA ${LVM_FIRST} + 27
+!define /math LVM_SETCOLUMNWIDTH ${LVM_FIRST} + 30
+!define /math LVM_SETITEMSTATE ${LVM_FIRST} + 43
+!define /math LVM_GETITEMSTATE ${LVM_FIRST} + 44
+!define /math LVM_GETITEMTEXTA ${LVM_FIRST} + 45
+!define /math LVM_SETITEMTEXTA ${LVM_FIRST} + 46
+!define /math LVM_SETITEMCOUNT ${LVM_FIRST} + 47
+!define /math LVM_SORTITEMS ${LVM_FIRST} + 48
+!define /math LVM_SETEXTENDEDLISTVIEWSTYLE ${LVM_FIRST} + 54
+!define /math LVM_GETEXTENDEDLISTVIEWSTYLE ${LVM_FIRST} + 55
+!define /math LVM_GETITEMW ${LVM_FIRST} + 75
+!define /math LVM_SETITEMW ${LVM_FIRST} + 76
+!define /math LVM_INSERTITEMW ${LVM_FIRST} + 77
+!define /math LVM_INSERTCOLUMNW ${LVM_FIRST} + 97
+!define /math LVM_GETITEMTEXTW ${LVM_FIRST} + 115
+!define /math LVM_SETITEMTEXTW ${LVM_FIRST} + 116
+!define /math LVM_SETSELECTEDCOLUMN ${LVM_FIRST} + 140
+${_NSIS_DEFAW} LVM_GETITEM
+${_NSIS_DEFAW} LVM_SETITEM
+${_NSIS_DEFAW} LVM_INSERTITEM
+${_NSIS_DEFAW} LVM_INSERTCOLUMN
+${_NSIS_DEFAW} LVM_GETITEMTEXT
+${_NSIS_DEFAW} LVM_SETITEMTEXT
+
+#Status bar window#
+!define SB_SIMPLEID 0x00ff
+
+#Scroll bar control#
+!define SBM_ENABLE_ARROWS 0x00E4 # Not in win3.1
+!define SBM_GETPOS 0x00E1 # Not in win3.1
+!define SBM_GETRANGE 0x00E3 # Not in win3.1
+!define SBM_GETSCROLLINFO 0x00EA
+!define SBM_SETPOS 0x00E0 # Not in win3.1
+!define SBM_SETRANGE 0x00E2 # Not in win3.1
+!define SBM_SETRANGEREDRAW 0x00E6 # Not in win3.1
+!define SBM_SETSCROLLINFO 0x00E9
+
+#Static control#
+!define STM_SETICON 0x0170
+!define STM_GETICON 0x0171
+!define STM_SETIMAGE 0x0172
+!define STM_GETIMAGE 0x0173
+!define STM_MSGMAX 0x0174
+
+#Tab control#
+!define TCS_SCROLLOPPOSITE 0x0001
+!define TCIF_TEXT 1
+!define TCIF_PARAM 8
+!define SYSSTRUCT_TCITEM (i,i,&i${NSIS_PTR_SIZE},t,i,i,p)
+!define TCM_FIRST 0x1300
+!define /math TCM_INSERTITEMA ${TCM_FIRST} + 7
+!define /math TCM_GETCURSEL ${TCM_FIRST} + 11
+!define /math TCM_ADJUSTRECT ${TCM_FIRST} + 40
+!define /math TCM_INSERTITEMW ${TCM_FIRST} + 62
+!define TCN_SELCHANGE -551
+!define TCN_SELCHANGING -552
+${_NSIS_DEFAW} TCM_INSERTITEM
+
+#Progress bar control#
+!define PBM_SETRANGE 0x401
+!define PBM_SETPOS 0x402
+!define PBM_DELTAPOS 0x403
+!define PBM_SETSTEP 0x404
+!define PBM_STEPIT 0x405
+!define PBM_SETRANGE32 0x406 ; IE3 + ComCtl32 v4.70
+!define PBM_GETRANGE 0x407
+!define PBM_GETPOS 0x408
+!define PBM_SETBARCOLOR 0x409 ; IE4 + ComCtl32 v4.71
+!define PBM_SETBKCOLOR ${CCM_SETBKCOLOR}
+!define PBM_SETMARQUEE 0x40A ; WinXP + ComCtl32 v6
+!define PBM_GETSTEP 0x40D ; WinVista
+!define PBM_GETBKCOLOR 0x40E
+!define PBM_GETBARCOLOR 0x40F
+!define PBM_SETSTATE 0x410
+!define PBM_GETSTATE 0x411
+
+!define PBST_NORMAL 1
+!define PBST_ERROR 2
+!define PBST_PAUSED 3
+
+#Animation control#
+!define /math ACM_OPENA ${WM_USER} + 100
+!define /math ACM_PLAY ${WM_USER} + 101
+!define /math ACM_STOP ${WM_USER} + 102
+!define /math ACM_OPENW ${WM_USER} + 103
+${_NSIS_DEFAW} ACM_OPEN
+
+#TrackBar control#
+!define /math TBM_GETPOS ${WM_USER} + 0
+!define /math TBM_GETRANGEMIN ${WM_USER} + 1
+!define /math TBM_GETRANGEMAX ${WM_USER} + 2
+!define /math TBM_GETTIC ${WM_USER} + 3
+!define /math TBM_SETTIC ${WM_USER} + 4
+!define /math TBM_SETPOS ${WM_USER} + 5
+!define /math TBM_SETRANGE ${WM_USER} + 6
+!define /math TBM_SETRANGEMIN ${WM_USER} + 7
+!define /math TBM_SETRANGEMAX ${WM_USER} + 8
+!define /math TBM_CLEARTICS ${WM_USER} + 9
+!define /math TBM_SETSEL ${WM_USER} + 10
+!define /math TBM_SETSELSTART ${WM_USER} + 11
+!define /math TBM_SETSELEND ${WM_USER} + 12
+!define /math TBM_GETPTICS ${WM_USER} + 14
+!define /math TBM_GETTICPOS ${WM_USER} + 15
+!define /math TBM_GETNUMTICS ${WM_USER} + 16
+!define /math TBM_GETSELSTART ${WM_USER} + 17
+!define /math TBM_GETSELEND ${WM_USER} + 18
+!define /math TBM_CLEARSEL ${WM_USER} + 19
+!define /math TBM_SETTICFREQ ${WM_USER} + 20 ; TBS_AUTOTICKS required
+!define /math TBM_SETPAGESIZE ${WM_USER} + 21
+!define /math TBM_GETPAGESIZE ${WM_USER} + 22
+!define /math TBM_SETLINESIZE ${WM_USER} + 23
+!define /math TBM_GETLINESIZE ${WM_USER} + 24
+!define /math TBM_GETTHUMBRECT ${WM_USER} + 25
+!define /math TBM_GETCHANNELRECT ${WM_USER} + 26
+!define /math TBM_SETTHUMBLENGTH ${WM_USER} + 27
+!define /math TBM_GETTHUMBLENGTH ${WM_USER} + 28
+!define /math TBM_SETTOOLTIPS ${WM_USER} + 29 ; IE3
+!define /math TBM_GETTOOLTIPS ${WM_USER} + 30 ; IE3
+!define /math TBM_SETTIPSIDE ${WM_USER} + 31 ; IE3
+!define /math TBM_SETBUDDY ${WM_USER} + 32 ; IE3
+!define /math TBM_GETBUDDY ${WM_USER} + 33 ; IE3
+!define TBM_SETUNICODEFORMAT ${CCM_SETUNICODEFORMAT} ; IE4
+!define TBM_GETUNICODEFORMAT ${CCM_GETUNICODEFORMAT} ; IE4
+!define /math TBM_SETPOSNOTIFY ${WM_USER} + 34 ; 7?
+
+#UpDown controls#
+!define /math UDM_SETRANGE ${WM_USER} + 101
+!define /math UDM_GETRANGE ${WM_USER} + 102
+!define /math UDM_SETPOS ${WM_USER} + 103
+!define /math UDM_GETPOS ${WM_USER} + 104
+!define /math UDM_SETBUDDY ${WM_USER} + 105
+!define /math UDM_GETBUDDY ${WM_USER} + 106
+!define /math UDM_SETACCEL ${WM_USER} + 107
+!define /math UDM_GETACCEL ${WM_USER} + 108
+!define /math UDM_SETBASE ${WM_USER} + 109
+!define /math UDM_GETBASE ${WM_USER} + 110
+!define /math UDM_SETRANGE32 ${WM_USER} + 111 ; IE4
+!define /math UDM_GETRANGE32 ${WM_USER} + 112 ; IE4
+!define UDM_SETUNICODEFORMAT ${CCM_SETUNICODEFORMAT} ; IE4
+!define UDM_GETUNICODEFORMAT ${CCM_GETUNICODEFORMAT} ; IE4
+!define /math UDM_SETPOS32 ${WM_USER} + 113 ; IE5
+!define /math UDM_GETPOS32 ${WM_USER} + 114 ; IE5
+
+#HotKey control#
+!define /math HKM_SETHOTKEY ${WM_USER} + 1
+!define /math HKM_GETHOTKEY ${WM_USER} + 2
+!define /math HKM_SETRULES ${WM_USER} + 3
+!define /IfNDef HOTKEYF_SHIFT 0x01
+!define /IfNDef HOTKEYF_CONTROL 0x02
+!define /IfNDef HOTKEYF_ALT 0x04
+!define /IfNDef HOTKEYF_EXT 0x08
+!define HKCOMB_NONE 0x01
+!define HKCOMB_S 0x02
+!define HKCOMB_C 0x04
+!define HKCOMB_A 0x08
+!define HKCOMB_SC 0x10
+!define HKCOMB_SA 0x20
+!define HKCOMB_CA 0x40
+!define HKCOMB_SCA 0x80
+
+#IPAddress control#
+!define /math IPM_CLEARADDRESS ${WM_USER} + 100
+!define /math IPM_SETADDRESS ${WM_USER} + 101
+!define /math IPM_GETADDRESS ${WM_USER} + 102
+!define /math IPM_SETRANGE ${WM_USER} + 103
+!define /math IPM_SETFOCUS ${WM_USER} + 104
+!define /math IPM_ISBLANK ${WM_USER} + 105
+
+!verbose pop
+!endif
\ No newline at end of file
diff --git a/KattekerCreator/nsis/Include/WinVer.nsh b/KattekerCreator/nsis/Include/WinVer.nsh
new file mode 100644
index 0000000..ff22bed
--- /dev/null
+++ b/KattekerCreator/nsis/Include/WinVer.nsh
@@ -0,0 +1,558 @@
+; ---------------------
+; WinVer.nsh
+; ---------------------
+;
+; LogicLib extensions for handling Windows versions and service packs.
+;
+; IsNT checks if the installer is running on Windows NT family (NT4, 2000, XP, etc.)
+;
+; ${If} ${IsNT}
+; DetailPrint "Running on NT. Installing Unicode enabled application."
+; ${Else}
+; DetailPrint "Not running on NT. Installing ANSI application."
+; ${EndIf}
+;
+; IsServerOS checks if the installer is running on a server version of Windows (2000, 2003, 2008, etc.)
+; IsDomainController checks if the server is a domain controller
+;
+; AtLeastWin checks if the installer is running on Windows version at least as specified.
+; IsWin checks if the installer is running on Windows version exactly as specified.
+; AtMostWin checks if the installer is running on Windows version at most as specified.
+; AtLeastBuild checks if the installer is running on a Windows version with a minimum build number.
+; AtMostBuild checks if the installer is running on a Windows version with a maximum build number.
+;
+; can be replaced with the following values:
+;
+; 95
+; 98
+; ME
+;
+; NT4
+; 2000
+; XP
+; 2003
+; Vista
+; 2008
+; 7
+; 2008R2
+; 8
+; 2012
+; 8.1
+; 2012R2
+; 10
+;
+; Note: Windows 8.1 and later will be detected as Windows 8 unless ManifestSupportedOS is set correctly!
+;
+; AtLeastServicePack checks if the installer is running on Windows service pack version at least as specified.
+; IsServicePack checks if the installer is running on Windows service pack version exactly as specified.
+; AtMostServicePack checks if the installer is running on Windows service version pack at most as specified.
+;
+; Usage examples:
+;
+; ${If} ${IsNT}
+; DetailPrint "Running on NT family."
+; DetailPrint "Surely not running on 95, 98 or ME."
+; ${AndIf} ${AtLeastWinNT4}
+; DetailPrint "Running on NT4 or better. Could even be 2003."
+; ${EndIf}
+;
+; ${If} ${AtLeastWinXP}
+; DetailPrint "Running on XP or better."
+; ${EndIf}
+;
+; ${If} ${IsWin2000}
+; DetailPrint "Running on 2000."
+; ${EndIf}
+;
+; ${If} ${IsWin2000}
+; ${AndIf} ${AtLeastServicePack} 3
+; ${OrIf} ${AtLeastWinXP}
+; DetailPrint "Running Win2000 SP3 or above"
+; ${EndIf}
+;
+; ${If} ${AtMostWinXP}
+; DetailPrint "Running on XP or older. Surely not running on Vista. Maybe 98, or even 95."
+; ${EndIf}
+;
+; Warning:
+;
+; Windows 95 and NT both use the same version number. To avoid getting NT4 misidentified
+; as Windows 95 and vice-versa or 98 as a version higher than NT4, always use IsNT to
+; check if running on the NT family.
+;
+; ${If} ${AtLeastWin95}
+; ${And} ${AtMostWinME}
+; DetailPrint "Running 95, 98 or ME."
+; DetailPrint "Actually, maybe it's NT4?"
+; ${If} ${IsNT}
+; DetailPrint "Yes, it's NT4! oops..."
+; ${Else}
+; DetailPrint "Nope, not NT4. phew..."
+; ${EndIf}
+; ${EndIf}
+;
+;
+; Other useful extensions are:
+;
+; * IsWin2003R2
+; * IsStarterEdition
+; * OSHasMediaCenter
+; * OSHasTabletSupport
+;
+
+!verbose push
+!verbose 3
+
+!ifndef ___WINVER__NSH___
+!define ___WINVER__NSH___
+
+!include LogicLib.nsh
+!include Util.nsh
+
+# masks for our variables
+
+!define _WINVER_VERXBIT 0x00000001 ; Used to boost $__WINVERV
+!define _WINVER_MASKVMAJ 0x7F000000 ; $__WINVERV mask
+!define _WINVER_MASKVMIN 0x00FF0000 ; $__WINVERV mask
+!define _WINVER_NTMASK 0x7FFFFFFF ; $__WINVERV mask used by AtMost/AtLeast
+!define _WINVER_NTBIT 0x80000000 ; $__WINVERV bit used by Is and $__WINVERSP bit used by IsNT
+!define _WINVER_NTSRVBIT 0x40000000 ; $__WINVERSP bit for !VER_NT_WORKSTATION
+!define _WINVER_NTDCBIT 0x20000000 ; $__WINVERSP bit for VER_NT_DOMAIN_CONTROLLER
+!define _WINVER_MASKVBLD 0x0000FFFF ; $__WINVERSP mask for OS build number
+!define _WINVER_MASKSP 0x000F0000 ; $__WINVERSP mask for OS service pack
+
+# possible variable values for different versions
+
+!define WINVER_95_NT 0x04000000 ;4.00.0950
+!define WINVER_95 0x04000000 ;4.00.0950
+!define WINVER_98_NT 0x040a0000 ;4.10.1998
+!define WINVER_98 0x040a0000 ;4.10.1998
+;define WINVER_98SE 0x040a0000 ;4.10.2222
+!define WINVER_ME_NT 0x045a0000 ;4.90.3000
+!define WINVER_ME 0x045a0000 ;4.90.3000
+;define WINVER_NT3.51 ;3.51.1057
+!define WINVER_NT4_NT 0x84000000 ;4.00.1381
+!define WINVER_NT4 0x04000000 ;4.00.1381
+!define WINVER_2000_NT 0x85000000 ;5.00.2195
+!define WINVER_2000 0x05000000 ;5.00.2195
+!define WINVER_XP_NT 0x85010000 ;5.01.2600
+!define WINVER_XP 0x05010000 ;5.01.2600
+;define WINVER_XP64 ;5.02.3790
+!define WINVER_2003_NT 0x85020000 ;5.02.3790
+!define WINVER_2003 0x05020000 ;5.02.3790
+!define WINVER_VISTA_NT 0x86000000 ;6.00.6000
+!define WINVER_VISTA 0x06000000 ;6.00.6000
+!define WINVER_2008_NT 0x86000001 ;6.00.6001
+!define WINVER_2008 0x06000001 ;6.00.6001
+!define WINVER_7_NT 0x86010000 ;6.01.7600
+!define WINVER_7 0x06010000 ;6.01.7600
+!define WINVER_2008R2_NT 0x86010001 ;6.01.7600
+!define WINVER_2008R2 0x06010001 ;6.01.7600
+!define WINVER_8_NT 0x86020000 ;6.02.9200
+!define WINVER_8 0x06020000 ;6.02.9200
+!define WINVER_2012_NT 0x86020001 ;6.02.9200
+!define WINVER_2012 0x06020001 ;6.02.9200
+!define WINVER_8.1_NT 0x86030000 ;6.03.9600
+!define WINVER_8.1 0x06030000 ;6.03.9600
+!define WINVER_2012R2_NT 0x86030001 ;6.03.9600
+!define WINVER_2012R2 0x06030001 ;6.03.9600
+!define WINVER_10_NT 0x8A000000 ;10.0.10240
+!define WINVER_10 0x0A000000 ;10.0.10240
+!define WINVER_2016_NT 0x8A000001 ;10.0.14393
+!define WINVER_2016 0x0A000001 ;10.0.14393
+
+
+# use this to make all nt > 9x
+
+!ifdef WINVER_NT4_OVER_W95
+ !define /redef /math WINVER_NT4 ${WINVER_NT4} | ${_WINVER_VERXBIT}
+!endif
+
+# some definitions from header files
+
+!define OSVERSIONINFOW_SIZE 276
+!define OSVERSIONINFOEXW_SIZE 284
+!define OSVERSIONINFOA_SIZE 148
+!define OSVERSIONINFOEXA_SIZE 156
+!define /ifndef VER_PLATFORM_WIN32_NT 2
+!define /ifndef VER_NT_WORKSTATION 1
+!define /ifndef VER_NT_DOMAIN_CONTROLLER 2
+!define /ifndef VER_NT_SERVER 3
+
+!define SM_TABLETPC 86
+!define SM_MEDIACENTER 87
+!define SM_STARTER 88
+!define SM_SERVERR2 89
+
+# variable declaration
+
+!macro __WinVer_DeclareVars
+
+ !ifndef __WINVER_VARS_DECLARED
+
+ !define __WINVER_VARS_DECLARED
+
+ Var /GLOBAL __WINVERV
+ Var /GLOBAL __WINVERSP
+
+ !endif
+
+!macroend
+
+# lazy initialization macro
+
+!ifmacrondef __WinVer_Call_GetVersionEx
+
+ !macro __WinVer_Call_GetVersionEx STRUCT_SIZE
+
+ System::Call '*$0(i ${STRUCT_SIZE})'
+ System::Call kernel32::GetVersionEx(pr0)i.r3
+
+ !macroend
+
+!endif
+
+!macro __WinVer_InitVars
+ # variables
+ !insertmacro __WinVer_DeclareVars
+
+ # only calculate version once
+ StrCmp $__WINVERV "" _winver_noveryet
+ Return
+ _winver_noveryet:
+
+ # push used registers on the stack
+ Push $0
+ Push $1 ;maj
+ Push $2 ;min
+ Push $3 ;bld
+ Push $R0 ;temp
+
+ # a plugin call will lock the Unicode mode, it is now safe to set the struct size
+ !ifdef NSIS_UNICODE
+ !define /redef OSVERSIONINFO_SIZE ${OSVERSIONINFOW_SIZE}
+ !define /redef OSVERSIONINFOEX_SIZE ${OSVERSIONINFOEXW_SIZE}
+ !else
+ !define /redef OSVERSIONINFO_SIZE ${OSVERSIONINFOA_SIZE}
+ !define /redef OSVERSIONINFOEX_SIZE ${OSVERSIONINFOEXA_SIZE}
+ !endif
+
+ # allocate memory
+ System::Call '*(&i${OSVERSIONINFOEX_SIZE})p.r0'
+
+ # use OSVERSIONINFOEX
+ !insertmacro __WinVer_Call_GetVersionEx ${OSVERSIONINFOEX_SIZE}
+
+ IntCmp $3 0 "" _winver_ex _winver_ex
+ # OSVERSIONINFOEX not allowed (Win9x or NT4 w/SP < 6), use OSVERSIONINFO
+ !insertmacro __WinVer_Call_GetVersionEx ${OSVERSIONINFO_SIZE}
+ _winver_ex:
+
+ # get results from struct
+ System::Call '*$0(i.s,i.r1,i.r2,i.r3,i.s,&t128.s,&i2.s,&i2,&i2,&i1.s,&i1)'
+
+ # free struct
+ System::Free $0
+
+ # win9x has major and minor info in high word of dwBuildNumber - remove it
+ IntOp $3 $3 & 0xFFFF
+
+ # get dwOSVersionInfoSize
+ Pop $R0
+
+ # get dwPlatformId
+ Pop $0
+
+ # NT?
+ IntCmp $0 ${VER_PLATFORM_WIN32_NT} "" _winver_notnt _winver_notnt
+ IntOp $__WINVERSP $__WINVERSP | ${_WINVER_NTBIT}
+ IntOp $__WINVERV $__WINVERV | ${_WINVER_NTBIT}
+ _winver_notnt:
+!ifndef NSIS_UNICODE
+!if "${NSIS_PTR_SIZE}" <= 4
+ # get service pack information
+ IntCmp $0 ${VER_PLATFORM_WIN32_NT} _winver_nt "" _winver_nt # win9x
+
+ # get szCSDVersion
+ Pop $0
+
+ # copy second char
+ StrCpy $0 $0 1 1
+
+ # discard invalid wServicePackMajor and wProductType
+ Pop $R0
+ Pop $R0
+
+ # switch
+ StrCmp $0 'A' "" +3
+ StrCpy $0 1
+ Goto _winver_sp_done
+ StrCmp $0 'B' "" +3
+ StrCpy $0 2
+ Goto _winver_sp_done
+ StrCmp $0 'C' "" +3
+ StrCpy $0 3
+ Goto _winver_sp_done
+ StrCpy $0 0
+ Goto _winver_sp_done
+
+ _winver_nt: # nt
+!endif #~ 32-bit
+!endif #~ ANSI
+ IntCmp $R0 ${OSVERSIONINFOEX_SIZE} "" _winver_sp_noex _winver_sp_noex
+
+ # discard szCSDVersion
+ Pop $0
+
+ # get wProductType
+ Exch
+ Pop $0
+
+ # is server?
+ IntCmp $0 ${VER_NT_WORKSTATION} _winver_nt_notsrv
+ IntOp $__WINVERSP $__WINVERSP | ${_WINVER_NTSRVBIT}
+ IntCmp $0 ${VER_NT_DOMAIN_CONTROLLER} "" _winver_nt_notdc _winver_nt_notdc
+ IntOp $__WINVERSP $__WINVERSP | ${_WINVER_NTDCBIT}
+ _winver_nt_notdc:
+ _winver_nt_notsrv:
+
+ # get wServicePackMajor
+ Pop $0
+
+ # done with sp
+ Goto _winver_sp_done
+
+ _winver_sp_noex: # OSVERSIONINFO, not OSVERSIONINFOEX
+
+ #### TODO
+ ## For IsServerOS to support < NT4SP6, we need to check the registry
+ ## here to see if we are a server and/or DC
+
+ # get szCSDVersion
+ Pop $0
+
+ # discard invalid wServicePackMajor and wProductType
+ Pop $R0
+ Pop $R0
+
+ # get service pack number from text
+ StrCpy $R0 $0 13
+ StrCmp $R0 "Service Pack " "" +3
+ StrCpy $0 $0 "" 13 # cut "Service Pack "
+ Goto +2
+ StrCpy $0 0 # no service pack
+
+!ifdef WINVER_NT4_OVER_W95
+ IntOp $__WINVERV $__WINVERV | ${_WINVER_VERXBIT} ; change NT 4.0.reserved.0 to 4.0.reserved.1
+!endif
+
+ _winver_sp_done:
+
+ # store service pack
+ IntOp $0 $0 << 16
+ IntOp $__WINVERSP $__WINVERSP | $0
+
+ ### now for the version
+
+ # is server?
+ IntOp $0 $__WINVERSP & ${_WINVER_NTSRVBIT}
+
+ # windows xp x64?
+ IntCmp $0 0 "" _winver_not_xp_x64 _winver_not_xp_x64 # not server
+ IntCmp $1 5 "" _winver_not_xp_x64 _winver_not_xp_x64 # maj 5
+ IntCmp $2 2 "" _winver_not_xp_x64 _winver_not_xp_x64 # min 2
+ # change XP x64 from 5.2 to 5.1 so it's still XP
+ StrCpy $2 1
+ _winver_not_xp_x64:
+
+ # server 2008?
+ IntCmp $0 0 _winver_not_ntserver # server
+ IntCmp 6 $1 "" "" _winver_not_ntserver # maj 6
+ # extra bit so Server 2008 comes after Vista SP1 that has the same minor version, same for Win7 vs 2008R2
+ IntOp $__WINVERV $__WINVERV | ${_WINVER_VERXBIT}
+ _winver_not_ntserver:
+
+ # pack version
+ IntOp $1 $1 << 24 # VerMajor
+ IntOp $__WINVERV $__WINVERV | $1
+ IntOp $0 $2 << 16
+ IntOp $__WINVERV $__WINVERV | $0 # VerMinor
+ IntOp $__WINVERSP $__WINVERSP | $3 # VerBuild
+
+ # restore registers
+ Pop $R0
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+!macroend
+
+# version comparison LogicLib macros
+
+!macro _WinVerAtLeast _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ ${CallArtificialFunction} __WinVer_InitVars
+ IntOp $_LOGICLIB_TEMP $__WINVERV & ${_WINVER_NTMASK}
+ !insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+!macro _WinVerIs _a _b _t _f
+ ${CallArtificialFunction} __WinVer_InitVars
+ !insertmacro _= $__WINVERV `${_b}` `${_t}` `${_f}`
+!macroend
+!macro _WinVerAtMost _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ ${CallArtificialFunction} __WinVer_InitVars
+ IntOp $_LOGICLIB_TEMP $__WINVERV & ${_WINVER_NTMASK}
+ !insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+
+!macro __WinVer_DefineOSTest Test OS Suffix
+ !define ${Test}Win${OS} `"" WinVer${Test} ${WINVER_${OS}${Suffix}}`
+!macroend
+
+!macro __WinVer_DefineOSTests Test Suffix
+ !insertmacro __WinVer_DefineOSTest ${Test} 95 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 98 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} ME '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} NT4 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 2000 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} XP '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 2003 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} VISTA '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 2008 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 7 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 2008R2 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 8 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 2012 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 8.1 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 2012R2 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 10 '${Suffix}'
+ !insertmacro __WinVer_DefineOSTest ${Test} 2016 '${Suffix}'
+!macroend
+
+!insertmacro __WinVer_DefineOSTests AtLeast ""
+!insertmacro __WinVer_DefineOSTests Is _NT
+!insertmacro __WinVer_DefineOSTests AtMost ""
+
+# version feature LogicLib macros
+
+!macro __WinVer_LL_IsBitSet _v _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ ${CallArtificialFunction} __WinVer_InitVars
+ IntOp $_LOGICLIB_TEMP ${_v} & ${_b}
+ !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
+!macroend
+
+!define IsNT `$__WINVERSP _WinVer_LL_IsBitSet ${_WINVER_NTBIT}`
+!define IsServerOS `$__WINVERSP _WinVer_LL_IsBitSet ${_WINVER_NTSRVBIT}`
+!define IsDomainController `$__WINVERSP _WinVer_LL_IsBitSet ${_WINVER_NTDCBIT}`
+
+# service pack macros
+
+!macro _WinVer_GetServicePackLevel OUTVAR
+ ${CallArtificialFunction} __WinVer_InitVars
+ IntOp ${OUTVAR} $__WINVERSP & ${_WINVER_MASKSP}
+ IntOp ${OUTVAR} ${OUTVAR} >> 16
+!macroend
+!define WinVerGetServicePackLevel '!insertmacro _WinVer_GetServicePackLevel '
+
+!macro _AtLeastServicePack _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ ${WinVerGetServicePackLevel} $_LOGICLIB_TEMP
+ !insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+!define AtLeastServicePack `"" AtLeastServicePack`
+
+!macro _AtMostServicePack _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ ${WinVerGetServicePackLevel} $_LOGICLIB_TEMP
+ !insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+!define AtMostServicePack `"" AtMostServicePack`
+
+!macro _IsServicePack _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ ${WinVerGetServicePackLevel} $_LOGICLIB_TEMP
+ !insertmacro _= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+!define IsServicePack `"" IsServicePack`
+
+# special feature LogicLib macros
+
+!macro _WinVer_SysMetricCheck m _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ System::Call user32::GetSystemMetrics(i${m})i.s
+ pop $_LOGICLIB_TEMP
+ !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
+!macroend
+
+!define IsWin2003R2 `${SM_SERVERR2} WinVer_SysMetricCheck ""`
+!define IsStarterEdition `${SM_STARTER} WinVer_SysMetricCheck ""`
+!define OSHasMediaCenter `${SM_MEDIACENTER} WinVer_SysMetricCheck ""`
+!define OSHasTabletSupport `${SM_TABLETPC} WinVer_SysMetricCheck ""`
+
+# version retrieval macros
+
+!macro __WinVer_GetVer var rshift mask outvar
+ ${CallArtificialFunction} __WinVer_InitVars
+ !if "${mask}" != ""
+ IntOp ${outvar} ${var} & ${mask}
+ !if "${rshift}" != ""
+ IntOp ${outvar} ${outvar} >> ${rshift}
+ !endif
+ !else
+ IntOp ${outvar} ${var} >> ${rshift}
+ !endif
+!macroend
+
+!define WinVerGetMajor '!insertmacro __WinVer_GetVer $__WINVERV 24 ${_WINVER_MASKVMAJ}'
+!define WinVerGetMinor '!insertmacro __WinVer_GetVer $__WINVERV 16 ${_WINVER_MASKVMIN}'
+!define WinVerGetBuild '!insertmacro __WinVer_GetVer $__WINVERSP "" ${_WINVER_MASKVBLD}'
+
+!macro _WinVer_BuildNumCheck op num _t _f
+ !insertmacro _LOGICLIB_TEMP
+ ${WinVerGetBuild} $_LOGICLIB_TEMP
+ !insertmacro _${op} $_LOGICLIB_TEMP ${num} `${_t}` `${_f}`
+!macroend
+!define AtLeastBuild `U>= WinVer_BuildNumCheck `
+!define AtMostBuild `U<= WinVer_BuildNumCheck `
+
+# Windows as a Service macros
+
+!macro WinVer_WaaS id build fu codename marketingname
+ !if "${id}" == ${fu}
+ !define WinVer_WaaS_Build ${build}
+ !else if "${id}" == "${codename}"
+ !define WinVer_WaaS_Build ${build}
+ !else if "${id}" == "${marketingname}"
+ !define WinVer_WaaS_Build ${build}
+ !endif
+!macroend
+
+!macro _WinVer_WaaS op id _t _f
+ !insertmacro WinVer_WaaS "${id}" 10240 1507 "Threshold" "RTM"
+ !insertmacro WinVer_WaaS "${id}" 10586 1511 "Threshold 2" "November Update"
+ !insertmacro WinVer_WaaS "${id}" 14393 1607 "Redstone" "Anniversary Update"
+ !insertmacro WinVer_WaaS "${id}" 15063 1703 "Redstone 2" "Creators Update"
+ !insertmacro WinVer_WaaS "${id}" 16299 1709 "Redstone 3" "Fall Creators Update"
+ !insertmacro WinVer_WaaS "${id}" 17134 1803 "Redstone 4" "April 2018 Update"
+ !insertmacro WinVer_WaaS "${id}" 17763 1809 "Redstone 5" "October 2018 Update"
+ ;insertmacro WinVer_WaaS "${id}" ????? 1903 "19H1" "?"
+ !ifmacrodef WinVerExternal_WaaS_MapToBuild
+ !insertmacro WinVerExternal_WaaS_MapToBuild ${op} "${id}" WinVer_WaaS_Build
+ !endif
+ !define /IfNDef WinVer_WaaS_Build 0
+ !if "${WinVer_WaaS_Build}" <= 9600
+ !error 'WinVer: Unknown WaaS name: ${id}'
+ !endif
+ !insertmacro _WinVer_BuildNumCheck ${op} ${WinVer_WaaS_Build} `${_t}` `${_f}`
+ !undef WinVer_WaaS_Build
+!macroend
+
+!define AtLeastWaaS `U>= WinVer_WaaS `
+!define AtMostWaaS `U<= WinVer_WaaS `
+
+!endif # !___WINVER__NSH___
+
+!verbose pop
diff --git a/KattekerCreator/nsis/Include/WordFunc.nsh b/KattekerCreator/nsis/Include/WordFunc.nsh
new file mode 100644
index 0000000..0cb645a
--- /dev/null
+++ b/KattekerCreator/nsis/Include/WordFunc.nsh
@@ -0,0 +1,1800 @@
+/*
+_____________________________________________________________________________
+
+ Word Functions Header v3.3
+_____________________________________________________________________________
+
+ 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+ See documentation for more information about the following functions.
+
+ Usage in script:
+ 1. !include "WordFunc.nsh"
+ 2. [Section|Function]
+ ${WordFunction} "Param1" "Param2" "..." $var
+ [SectionEnd|FunctionEnd]
+
+
+ WordFunction=[WordFind|WordFindS|WordFind2X|WordFind2XS|WordFind3X|WordFind3XS|
+ WordReplace|WordReplaceS|WordAdd|WordAddS|WordInsert|WordInsertS|
+ StrFilter|StrFilterS|VersionCompare|VersionConvert]
+
+_____________________________________________________________________________
+
+ Thanks to:
+_____________________________________________________________________________
+
+WordFind3X
+ Afrow UK (Based on his idea of Function "StrSortLR")
+StrFilter
+ sunjammer (Function "StrUpper")
+VersionCompare
+ Afrow UK (Based on his Function "VersionCheckNew2")
+VersionConvert
+ Afrow UK (Based on his idea of Function "CharIndexReplace")
+*/
+
+
+;_____________________________________________________________________________
+;
+; Macros
+;_____________________________________________________________________________
+;
+; Change log window verbosity (default: 3=no script)
+;
+; Example:
+; !include "WordFunc.nsh"
+; !insertmacro WordFind
+; ${WORDFUNC_VERBOSE} 4 # all verbosity
+; !insertmacro WordReplace
+; ${WORDFUNC_VERBOSE} 3 # no script
+
+!ifndef WORDFUNC_INCLUDED
+
+!verbose push 3
+!define /IfNDef _WORDFUNC_VERBOSE 3
+!verbose ${_WORDFUNC_VERBOSE}
+!define WORDFUNC_VERBOSE `!insertmacro WORDFUNC_VERBOSE`
+
+!define WORDFUNC_INCLUDED
+
+!include Util.nsh
+
+
+!macro WORDFUNC_VERBOSE _VERBOSE
+ !verbose push 3
+ !define /ReDef _WORDFUNC_VERBOSE ${_VERBOSE}
+ !verbose pop
+!macroend
+
+
+!macro WordFindCall _ART _STRING _DELIMITER _OPTION _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_OPTION}`
+ ${CallArtificialFunction}${_ART} WordFind_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFindSCall _ART _STRING _DELIMITER _OPTION _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_OPTION}`
+ ${CallArtificialFunction}${_ART} WordFindS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFind2XCall _STRING _DELIMITER1 _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordFind2X_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFind2XSCall _STRING _DELIMITER1 _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordFind2XS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFind3XCall _STRING _DELIMITER1 _CENTER _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_CENTER}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordFind3X_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFind3XSCall _STRING _DELIMITER1 _CENTER _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_CENTER}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordFind3XS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordReplaceCall _STRING _WORD1 _WORD2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_WORD1}`
+ Push `${_WORD2}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordReplace_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordReplaceSCall _STRING _WORD1 _WORD2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_WORD1}`
+ Push `${_WORD2}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordReplaceS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordAddCall _STRING1 _DELIMITER _STRING2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING1}`
+ Push `${_DELIMITER}`
+ Push `${_STRING2}`
+ ${CallArtificialFunction} WordAdd_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordAddSCall _STRING1 _DELIMITER _STRING2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING1}`
+ Push `${_DELIMITER}`
+ Push `${_STRING2}`
+ ${CallArtificialFunction} WordAddS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordInsertCall _STRING _DELIMITER _WORD _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_WORD}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordInsert_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordInsertSCall _STRING _DELIMITER _WORD _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_WORD}`
+ Push `${_NUMBER}`
+ ${CallArtificialFunction} WordInsertS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro StrFilterCall _STRING _FILTER _INCLUDE _EXCLUDE _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_FILTER}`
+ Push `${_INCLUDE}`
+ Push `${_EXCLUDE}`
+ ${CallArtificialFunction} StrFilter_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro StrFilterSCall _STRING _FILTER _INCLUDE _EXCLUDE _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_FILTER}`
+ Push `${_INCLUDE}`
+ Push `${_EXCLUDE}`
+ ${CallArtificialFunction} StrFilterS_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro VersionCompareCall _VER1 _VER2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_VER1}`
+ Push `${_VER2}`
+ ${CallArtificialFunction} VersionCompare_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro VersionConvertCall _VERSION _CHARLIST _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_VERSION}`
+ Push `${_CHARLIST}`
+ ${CallArtificialFunction} VersionConvert_
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFindBody _WORDFUNC_S
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Exch 2
+ Exch $R0
+ Exch 2
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R1
+ Push $R2
+ ClearErrors
+
+ StrCpy $9 ''
+ StrCpy $2 $1 1
+ StrCpy $1 $1 '' 1
+ StrCmp $2 'E' 0 +3
+ StrCpy $9 E
+ goto -4
+
+ StrCpy $3 ''
+ StrCmp${_WORDFUNC_S} $2 '+' +6
+ StrCmp${_WORDFUNC_S} $2 '-' +5
+ StrCmp${_WORDFUNC_S} $2 '/' WordFunc_WordFind${_WORDFUNC_S}_restart
+ StrCmp${_WORDFUNC_S} $2 '#' WordFunc_WordFind${_WORDFUNC_S}_restart
+ StrCmp${_WORDFUNC_S} $2 '*' WordFunc_WordFind${_WORDFUNC_S}_restart
+ goto WordFunc_WordFind${_WORDFUNC_S}_error3
+
+ StrCpy $4 $1 1 -1
+ StrCmp${_WORDFUNC_S} $4 '*' +4
+ StrCmp${_WORDFUNC_S} $4 '}' +3
+ StrCmp${_WORDFUNC_S} $4 '{' +2
+ goto +4
+ StrCpy $1 $1 -1
+ StrCpy $3 '$4$3'
+ goto -7
+ StrCmp${_WORDFUNC_S} $3 '*' WordFunc_WordFind${_WORDFUNC_S}_error3
+ StrCmp${_WORDFUNC_S} $3 '**' WordFunc_WordFind${_WORDFUNC_S}_error3
+ StrCmp${_WORDFUNC_S} $3 '}{' WordFunc_WordFind${_WORDFUNC_S}_error3
+ IntOp $1 $1 + 0
+ StrCmp${_WORDFUNC_S} $1 0 WordFunc_WordFind${_WORDFUNC_S}_error2
+
+ WordFunc_WordFind${_WORDFUNC_S}_restart:
+ StrCmp${_WORDFUNC_S} $R0 '' WordFunc_WordFind${_WORDFUNC_S}_error1
+ StrCpy $4 0
+ StrCpy $5 0
+ StrCpy $6 0
+ StrLen $7 $0
+ goto WordFunc_WordFind${_WORDFUNC_S}_loop
+
+ WordFunc_WordFind${_WORDFUNC_S}_preloop:
+ IntOp $6 $6 + 1
+
+ WordFunc_WordFind${_WORDFUNC_S}_loop:
+ StrCpy $8 $R0 $7 $6
+ StrCmp${_WORDFUNC_S} $8$5 0 WordFunc_WordFind${_WORDFUNC_S}_error1
+ StrLen $R2 $8
+ IntCmp $R2 0 +2
+ StrCmp${_WORDFUNC_S} $8 $0 +5 WordFunc_WordFind${_WORDFUNC_S}_preloop
+ StrCmp${_WORDFUNC_S} $3 '{' WordFunc_WordFind${_WORDFUNC_S}_minus
+ StrCmp${_WORDFUNC_S} $3 '}' WordFunc_WordFind${_WORDFUNC_S}_minus
+ StrCmp${_WORDFUNC_S} $2 '*' WordFunc_WordFind${_WORDFUNC_S}_minus
+ StrCmp${_WORDFUNC_S} $5 $6 WordFunc_WordFind${_WORDFUNC_S}_minus +5
+ StrCmp${_WORDFUNC_S} $3 '{' +4
+ StrCmp${_WORDFUNC_S} $3 '}' +3
+ StrCmp${_WORDFUNC_S} $2 '*' +2
+ StrCmp${_WORDFUNC_S} $5 $6 WordFunc_WordFind${_WORDFUNC_S}_nextword
+ IntOp $4 $4 + 1
+ StrCmp${_WORDFUNC_S} $2$4 +$1 WordFunc_WordFind${_WORDFUNC_S}_plus
+ StrCmp${_WORDFUNC_S} $2 '/' 0 WordFunc_WordFind${_WORDFUNC_S}_nextword
+ IntOp $8 $6 - $5
+ StrCpy $8 $R0 $8 $5
+ StrCmp${_WORDFUNC_S} $1 $8 0 WordFunc_WordFind${_WORDFUNC_S}_nextword
+ StrCpy $R1 $4
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ WordFunc_WordFind${_WORDFUNC_S}_nextword:
+ IntOp $6 $6 + $7
+ StrCpy $5 $6
+ goto WordFunc_WordFind${_WORDFUNC_S}_loop
+
+ WordFunc_WordFind${_WORDFUNC_S}_minus:
+ StrCmp${_WORDFUNC_S} $2 '-' 0 WordFunc_WordFind${_WORDFUNC_S}_sum
+ StrCpy $2 '+'
+ IntOp $1 $4 - $1
+ IntOp $1 $1 + 1
+ IntCmp $1 0 WordFunc_WordFind${_WORDFUNC_S}_error2 WordFunc_WordFind${_WORDFUNC_S}_error2 WordFunc_WordFind${_WORDFUNC_S}_restart
+ WordFunc_WordFind${_WORDFUNC_S}_sum:
+ StrCmp${_WORDFUNC_S} $2 '#' 0 WordFunc_WordFind${_WORDFUNC_S}_sumdelim
+ StrCpy $R1 $4
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ WordFunc_WordFind${_WORDFUNC_S}_sumdelim:
+ StrCmp${_WORDFUNC_S} $2 '*' 0 WordFunc_WordFind${_WORDFUNC_S}_error2
+ StrCpy $R1 $4
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+
+ WordFunc_WordFind${_WORDFUNC_S}_plus:
+ StrCmp${_WORDFUNC_S} $3 '' 0 +4
+ IntOp $6 $6 - $5
+ StrCpy $R1 $R0 $6 $5
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $3 '{' 0 +3
+ StrCpy $R1 $R0 $6
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $3 '}' 0 +4
+ IntOp $6 $6 + $7
+ StrCpy $R1 $R0 '' $6
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $3 '{*' +2
+ StrCmp${_WORDFUNC_S} $3 '*{' 0 +3
+ StrCpy $R1 $R0 $6
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $3 '*}' +2
+ StrCmp${_WORDFUNC_S} $3 '}*' 0 +3
+ StrCpy $R1 $R0 '' $5
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $3 '}}' 0 +3
+ StrCpy $R1 $R0 '' $6
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $3 '{{' 0 +3
+ StrCpy $R1 $R0 $5
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $3 '{}' 0 WordFunc_WordFind${_WORDFUNC_S}_error3
+ StrLen $3 $R0
+ StrCmp${_WORDFUNC_S} $3 $6 0 +3
+ StrCpy $0 ''
+ goto +2
+ IntOp $6 $6 + $7
+ StrCpy $8 $R0 '' $6
+ StrCmp${_WORDFUNC_S} $4$8 1 +6
+ StrCmp${_WORDFUNC_S} $4 1 +2 +7
+ IntOp $6 $6 + $7
+ StrCpy $3 $R0 $7 $6
+ StrCmp${_WORDFUNC_S} $3 '' +2
+ StrCmp${_WORDFUNC_S} $3 $0 -3 +3
+ StrCpy $R1 ''
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $5 0 0 +3
+ StrCpy $0 ''
+ goto +2
+ IntOp $5 $5 - $7
+ StrCpy $3 $R0 $5
+ StrCpy $R1 '$3$0$8'
+ goto WordFunc_WordFind${_WORDFUNC_S}_end
+
+ WordFunc_WordFind${_WORDFUNC_S}_error3:
+ StrCpy $R1 3
+ goto WordFunc_WordFind${_WORDFUNC_S}_error
+ WordFunc_WordFind${_WORDFUNC_S}_error2:
+ StrCpy $R1 2
+ goto WordFunc_WordFind${_WORDFUNC_S}_error
+ WordFunc_WordFind${_WORDFUNC_S}_error1:
+ StrCpy $R1 1
+ WordFunc_WordFind${_WORDFUNC_S}_error:
+ StrCmp $9 'E' 0 +3
+ SetErrors
+
+ WordFunc_WordFind${_WORDFUNC_S}_end:
+ StrCpy $R0 $R1
+
+ Pop $R2
+ Pop $R1
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+!macroend
+
+!define WordFind `!insertmacro WordFindCall ''`
+!define un.WordFind `!insertmacro WordFindCall ''`
+
+!macro WordFind
+!macroend
+
+!macro un.WordFind
+!macroend
+
+!macro WordFind_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordFindBody ''
+
+ !verbose pop
+!macroend
+
+!define WordFindS `!insertmacro WordFindSCall ''`
+!define un.WordFindS `!insertmacro WordFindSCall ''`
+
+!macro WordFindS
+!macroend
+
+!macro un.WordFindS
+!macroend
+
+!macro WordFindS_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordFindBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro WordFind2XBody _WORDFUNC_S
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Exch 3
+ Exch $R0
+ Exch 3
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R1
+ Push $R2
+ ClearErrors
+
+ StrCpy $R2 ''
+ StrCpy $3 $2 1
+ StrCpy $2 $2 '' 1
+ StrCmp $3 'E' 0 +3
+ StrCpy $R2 E
+ goto -4
+
+ StrCmp${_WORDFUNC_S} $3 '+' +5
+ StrCmp${_WORDFUNC_S} $3 '-' +4
+ StrCmp${_WORDFUNC_S} $3 '#' WordFunc_WordFind2X${_WORDFUNC_S}_restart
+ StrCmp${_WORDFUNC_S} $3 '/' WordFunc_WordFind2X${_WORDFUNC_S}_restart
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_error3
+
+ StrCpy $4 $2 2 -2
+ StrCmp${_WORDFUNC_S} $4 '{{' +9
+ StrCmp${_WORDFUNC_S} $4 '}}' +8
+ StrCmp${_WORDFUNC_S} $4 '{*' +7
+ StrCmp${_WORDFUNC_S} $4 '*{' +6
+ StrCmp${_WORDFUNC_S} $4 '*}' +5
+ StrCmp${_WORDFUNC_S} $4 '}*' +4
+ StrCmp${_WORDFUNC_S} $4 '{}' +3
+ StrCpy $4 ''
+ goto +2
+ StrCpy $2 $2 -2
+ IntOp $2 $2 + 0
+ StrCmp${_WORDFUNC_S} $2 0 WordFunc_WordFind2X${_WORDFUNC_S}_error2
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_restart:
+ StrCmp${_WORDFUNC_S} $R0 '' WordFunc_WordFind2X${_WORDFUNC_S}_error1
+ StrCpy $5 -1
+ StrCpy $6 0
+ StrCpy $7 ''
+ StrLen $8 $0
+ StrLen $9 $1
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_loop:
+ IntOp $5 $5 + 1
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_delim1:
+ StrCpy $R1 $R0 $8 $5
+ StrCmp${_WORDFUNC_S} $R1$6 0 WordFunc_WordFind2X${_WORDFUNC_S}_error1
+ StrCmp${_WORDFUNC_S} $R1 '' WordFunc_WordFind2X${_WORDFUNC_S}_minus
+ StrCmp${_WORDFUNC_S} $R1 $0 +2
+ StrCmp${_WORDFUNC_S} $7 '' WordFunc_WordFind2X${_WORDFUNC_S}_loop WordFunc_WordFind2X${_WORDFUNC_S}_delim2
+ StrCmp${_WORDFUNC_S} $0 $1 0 +2
+ StrCmp${_WORDFUNC_S} $7 '' 0 WordFunc_WordFind2X${_WORDFUNC_S}_delim2
+ IntOp $7 $5 + $8
+ StrCpy $5 $7
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_delim1
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_delim2:
+ StrCpy $R1 $R0 $9 $5
+ StrCmp${_WORDFUNC_S} $R1 $1 0 WordFunc_WordFind2X${_WORDFUNC_S}_loop
+ IntOp $6 $6 + 1
+ StrCmp${_WORDFUNC_S} $3$6 '+$2' WordFunc_WordFind2X${_WORDFUNC_S}_plus
+ StrCmp${_WORDFUNC_S} $3 '/' 0 WordFunc_WordFind2X${_WORDFUNC_S}_nextword
+ IntOp $R1 $5 - $7
+ StrCpy $R1 $R0 $R1 $7
+ StrCmp${_WORDFUNC_S} $R1 $2 0 +3
+ StrCpy $R1 $6
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+ WordFunc_WordFind2X${_WORDFUNC_S}_nextword:
+ IntOp $5 $5 + $9
+ StrCpy $7 ''
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_delim1
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_minus:
+ StrCmp${_WORDFUNC_S} $3 '-' 0 WordFunc_WordFind2X${_WORDFUNC_S}_sum
+ StrCpy $3 +
+ IntOp $2 $6 - $2
+ IntOp $2 $2 + 1
+ IntCmp $2 0 WordFunc_WordFind2X${_WORDFUNC_S}_error2 WordFunc_WordFind2X${_WORDFUNC_S}_error2 WordFunc_WordFind2X${_WORDFUNC_S}_restart
+ WordFunc_WordFind2X${_WORDFUNC_S}_sum:
+ StrCmp${_WORDFUNC_S} $3 '#' 0 WordFunc_WordFind2X${_WORDFUNC_S}_error2
+ StrCpy $R1 $6
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_plus:
+ StrCmp${_WORDFUNC_S} $4 '' 0 +4
+ IntOp $R1 $5 - $7
+ StrCpy $R1 $R0 $R1 $7
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+ IntOp $5 $5 + $9
+ IntOp $7 $7 - $8
+ StrCmp${_WORDFUNC_S} $4 '{*' +2
+ StrCmp${_WORDFUNC_S} $4 '*{' 0 +3
+ StrCpy $R1 $R0 $5
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $4 '*}' +2
+ StrCmp${_WORDFUNC_S} $4 '}*' 0 +3
+ StrCpy $R1 $R0 '' $7
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $4 '}}' 0 +3
+ StrCpy $R1 $R0 '' $5
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $4 '{{' 0 +3
+ StrCpy $R1 $R0 $7
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $4 '{}' 0 WordFunc_WordFind2X${_WORDFUNC_S}_error3
+ StrCpy $5 $R0 '' $5
+ StrCpy $7 $R0 $7
+ StrCpy $R1 '$7$5'
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_end
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_error3:
+ StrCpy $R1 3
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_error
+ WordFunc_WordFind2X${_WORDFUNC_S}_error2:
+ StrCpy $R1 2
+ goto WordFunc_WordFind2X${_WORDFUNC_S}_error
+ WordFunc_WordFind2X${_WORDFUNC_S}_error1:
+ StrCpy $R1 1
+ WordFunc_WordFind2X${_WORDFUNC_S}_error:
+ StrCmp $R2 'E' 0 +3
+ SetErrors
+
+ WordFunc_WordFind2X${_WORDFUNC_S}_end:
+ StrCpy $R0 $R1
+
+ Pop $R2
+ Pop $R1
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+!macroend
+
+!define WordFind2X `!insertmacro WordFind2XCall`
+!define un.WordFind2X `!insertmacro WordFind2XCall`
+
+!macro WordFind2X
+!macroend
+
+!macro un.WordFind2X
+!macroend
+
+!macro WordFind2X_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordFind2XBody ''
+
+ !verbose pop
+!macroend
+
+!define WordFind2XS `!insertmacro WordFind2XSCall`
+!define un.WordFind2XS `!insertmacro WordFind2XSCall`
+
+!macro WordFind2XS
+!macroend
+
+!macro un.WordFind2XS
+!macroend
+
+!macro WordFind2XS_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordFind2XBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro WordFind3XBody _WORDFUNC_S
+ Exch $3
+ Exch
+ Exch $2
+ Exch
+ Exch 2
+ Exch $1
+ Exch 2
+ Exch 3
+ Exch $0
+ Exch 3
+ Exch 4
+ Exch $R0
+ Exch 4
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R1
+ Push $R2
+ Push $R3
+ Push $R4
+ Push $R5
+ ClearErrors
+
+ StrCpy $R5 ''
+ StrCpy $4 $3 1
+ StrCpy $3 $3 '' 1
+ StrCmp $4 'E' 0 +3
+ StrCpy $R5 E
+ goto -4
+
+ StrCmp${_WORDFUNC_S} $4 '+' +5
+ StrCmp${_WORDFUNC_S} $4 '-' +4
+ StrCmp${_WORDFUNC_S} $4 '#' WordFunc_WordFind3X${_WORDFUNC_S}_restart
+ StrCmp${_WORDFUNC_S} $4 '/' WordFunc_WordFind3X${_WORDFUNC_S}_restart
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_error3
+
+ StrCpy $5 $3 2 -2
+ StrCmp${_WORDFUNC_S} $5 '{{' +9
+ StrCmp${_WORDFUNC_S} $5 '}}' +8
+ StrCmp${_WORDFUNC_S} $5 '{*' +7
+ StrCmp${_WORDFUNC_S} $5 '*{' +6
+ StrCmp${_WORDFUNC_S} $5 '*}' +5
+ StrCmp${_WORDFUNC_S} $5 '}*' +4
+ StrCmp${_WORDFUNC_S} $5 '{}' +3
+ StrCpy $5 ''
+ goto +2
+ StrCpy $3 $3 -2
+ IntOp $3 $3 + 0
+ StrCmp${_WORDFUNC_S} $3 0 WordFunc_WordFind3X${_WORDFUNC_S}_error2
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_restart:
+ StrCmp${_WORDFUNC_S} $R0 '' WordFunc_WordFind3X${_WORDFUNC_S}_error1
+ StrCpy $6 -1
+ StrCpy $7 0
+ StrCpy $8 ''
+ StrCpy $9 ''
+ StrLen $R1 $0
+ StrLen $R2 $1
+ StrLen $R3 $2
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_loop:
+ IntOp $6 $6 + 1
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_delim1:
+ StrCpy $R4 $R0 $R1 $6
+ StrCmp${_WORDFUNC_S} $R4$7 0 WordFunc_WordFind3X${_WORDFUNC_S}_error1
+ StrCmp${_WORDFUNC_S} $R4 '' WordFunc_WordFind3X${_WORDFUNC_S}_minus
+ StrCmp${_WORDFUNC_S} $R4 $0 +2
+ StrCmp${_WORDFUNC_S} $8 '' WordFunc_WordFind3X${_WORDFUNC_S}_loop WordFunc_WordFind3X${_WORDFUNC_S}_center
+ StrCmp${_WORDFUNC_S} $0 $1 +2
+ StrCmp${_WORDFUNC_S} $0 $2 0 +2
+ StrCmp${_WORDFUNC_S} $8 '' 0 WordFunc_WordFind3X${_WORDFUNC_S}_center
+ IntOp $8 $6 + $R1
+ StrCpy $6 $8
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_delim1
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_center:
+ StrCmp${_WORDFUNC_S} $9 '' 0 WordFunc_WordFind3X${_WORDFUNC_S}_delim2
+ StrCpy $R4 $R0 $R2 $6
+ StrCmp${_WORDFUNC_S} $R4 $1 0 WordFunc_WordFind3X${_WORDFUNC_S}_loop
+ IntOp $9 $6 + $R2
+ StrCpy $6 $9
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_delim1
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_delim2:
+ StrCpy $R4 $R0 $R3 $6
+ StrCmp${_WORDFUNC_S} $R4 $2 0 WordFunc_WordFind3X${_WORDFUNC_S}_loop
+ IntOp $7 $7 + 1
+ StrCmp${_WORDFUNC_S} $4$7 '+$3' WordFunc_WordFind3X${_WORDFUNC_S}_plus
+ StrCmp${_WORDFUNC_S} $4 '/' 0 WordFunc_WordFind3X${_WORDFUNC_S}_nextword
+ IntOp $R4 $6 - $8
+ StrCpy $R4 $R0 $R4 $8
+ StrCmp${_WORDFUNC_S} $R4 $3 0 +3
+ StrCpy $R4 $7
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+ WordFunc_WordFind3X${_WORDFUNC_S}_nextword:
+ IntOp $6 $6 + $R3
+ StrCpy $8 ''
+ StrCpy $9 ''
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_delim1
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_minus:
+ StrCmp${_WORDFUNC_S} $4 '-' 0 WordFunc_WordFind3X${_WORDFUNC_S}_sum
+ StrCpy $4 +
+ IntOp $3 $7 - $3
+ IntOp $3 $3 + 1
+ IntCmp $3 0 WordFunc_WordFind3X${_WORDFUNC_S}_error2 WordFunc_WordFind3X${_WORDFUNC_S}_error2 WordFunc_WordFind3X${_WORDFUNC_S}_restart
+ WordFunc_WordFind3X${_WORDFUNC_S}_sum:
+ StrCmp${_WORDFUNC_S} $4 '#' 0 WordFunc_WordFind3X${_WORDFUNC_S}_error2
+ StrCpy $R4 $7
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_plus:
+ StrCmp${_WORDFUNC_S} $5 '' 0 +4
+ IntOp $R4 $6 - $8
+ StrCpy $R4 $R0 $R4 $8
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+ IntOp $6 $6 + $R3
+ IntOp $8 $8 - $R1
+ StrCmp${_WORDFUNC_S} $5 '{*' +2
+ StrCmp${_WORDFUNC_S} $5 '*{' 0 +3
+ StrCpy $R4 $R0 $6
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $5 '*}' +2
+ StrCmp${_WORDFUNC_S} $5 '}*' 0 +3
+ StrCpy $R4 $R0 '' $8
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $5 '}}' 0 +3
+ StrCpy $R4 $R0 '' $6
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $5 '{{' 0 +3
+ StrCpy $R4 $R0 $8
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $5 '{}' 0 WordFunc_WordFind3X${_WORDFUNC_S}_error3
+ StrCpy $6 $R0 '' $6
+ StrCpy $8 $R0 $8
+ StrCpy $R4 '$8$6'
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_end
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_error3:
+ StrCpy $R4 3
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_error
+ WordFunc_WordFind3X${_WORDFUNC_S}_error2:
+ StrCpy $R4 2
+ goto WordFunc_WordFind3X${_WORDFUNC_S}_error
+ WordFunc_WordFind3X${_WORDFUNC_S}_error1:
+ StrCpy $R4 1
+ WordFunc_WordFind3X${_WORDFUNC_S}_error:
+ StrCmp $R5 'E' 0 +3
+ SetErrors
+
+ WordFunc_WordFind3X${_WORDFUNC_S}_end:
+ StrCpy $R0 $R4
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+!macroend
+
+!define WordFind3X `!insertmacro WordFind3XCall`
+!define un.WordFind3X `!insertmacro WordFind3XCall`
+
+!macro WordFind3X
+!macroend
+
+!macro un.WordFind3X
+!macroend
+
+!macro WordFind3X_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordFind3XBody ''
+
+ !verbose pop
+!macroend
+
+!define WordFind3XS `!insertmacro WordFind3XSCall`
+!define un.WordFind3XS `!insertmacro WordFind3XSCall`
+
+!macro WordFind3XS
+!macroend
+
+!macro un.WordFind3XS
+!macroend
+
+!macro WordFind3XS_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordFind3XBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro WordReplaceBody _WORDFUNC_S
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Exch 3
+ Exch $R0
+ Exch 3
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R1
+ ClearErrors
+
+ StrCpy $R1 $R0
+ StrCpy $9 ''
+ StrCpy $3 $2 1
+ StrCpy $2 $2 '' 1
+ StrCmp $3 'E' 0 +3
+ StrCpy $9 E
+ goto -4
+
+ StrCpy $4 $2 1 -1
+ StrCpy $5 ''
+ StrCpy $6 ''
+ StrLen $7 $0
+
+ StrCmp${_WORDFUNC_S} $7 0 WordFunc_WordReplace${_WORDFUNC_S}_error1
+ StrCmp${_WORDFUNC_S} $R0 '' WordFunc_WordReplace${_WORDFUNC_S}_error1
+ StrCmp${_WORDFUNC_S} $3 '{' WordFunc_WordReplace${_WORDFUNC_S}_beginning
+ StrCmp${_WORDFUNC_S} $3 '}' WordFunc_WordReplace${_WORDFUNC_S}_ending WordFunc_WordReplace${_WORDFUNC_S}_errorchk
+
+ WordFunc_WordReplace${_WORDFUNC_S}_beginning:
+ StrCpy $8 $R0 $7
+ StrCmp${_WORDFUNC_S} $8 $0 0 +4
+ StrCpy $R0 $R0 '' $7
+ StrCpy $5 '$5$1'
+ goto -4
+ StrCpy $3 $2 1
+ StrCmp${_WORDFUNC_S} $3 '}' 0 WordFunc_WordReplace${_WORDFUNC_S}_merge
+
+ WordFunc_WordReplace${_WORDFUNC_S}_ending:
+ StrCpy $8 $R0 '' -$7
+ StrCmp${_WORDFUNC_S} $8 $0 0 +4
+ StrCpy $R0 $R0 -$7
+ StrCpy $6 '$6$1'
+ goto -4
+
+ WordFunc_WordReplace${_WORDFUNC_S}_merge:
+ StrCmp${_WORDFUNC_S} $4 '*' 0 +5
+ StrCmp${_WORDFUNC_S} $5 '' +2
+ StrCpy $5 $1
+ StrCmp${_WORDFUNC_S} $6 '' +2
+ StrCpy $6 $1
+ StrCpy $R0 '$5$R0$6'
+ goto WordFunc_WordReplace${_WORDFUNC_S}_end
+
+ WordFunc_WordReplace${_WORDFUNC_S}_errorchk:
+ StrCmp${_WORDFUNC_S} $3 '+' +2
+ StrCmp${_WORDFUNC_S} $3 '-' 0 WordFunc_WordReplace${_WORDFUNC_S}_error3
+
+ StrCpy $5 $2 1
+ IntOp $2 $2 + 0
+ StrCmp${_WORDFUNC_S} $2 0 0 WordFunc_WordReplace${_WORDFUNC_S}_one
+ StrCmp${_WORDFUNC_S} $5 0 WordFunc_WordReplace${_WORDFUNC_S}_error2
+ StrCpy $3 ''
+
+ WordFunc_WordReplace${_WORDFUNC_S}_all:
+ StrCpy $5 0
+ StrCpy $2 $R0 $7 $5
+ StrCmp${_WORDFUNC_S} $2 '' +4
+ StrCmp${_WORDFUNC_S} $2 $0 +6
+ IntOp $5 $5 + 1
+ goto -4
+ StrCmp${_WORDFUNC_S} $R0 $R1 WordFunc_WordReplace${_WORDFUNC_S}_error1
+ StrCpy $R0 '$3$R0'
+ goto WordFunc_WordReplace${_WORDFUNC_S}_end
+ StrCpy $2 $R0 $5
+ IntOp $5 $5 + $7
+ StrCmp${_WORDFUNC_S} $4 '*' 0 +3
+ StrCpy $6 $R0 $7 $5
+ StrCmp${_WORDFUNC_S} $6 $0 -3
+ StrCpy $R0 $R0 '' $5
+ StrCpy $3 '$3$2$1'
+ goto WordFunc_WordReplace${_WORDFUNC_S}_all
+
+ WordFunc_WordReplace${_WORDFUNC_S}_one:
+ StrCpy $5 0
+ StrCpy $8 0
+ goto WordFunc_WordReplace${_WORDFUNC_S}_loop
+
+ WordFunc_WordReplace${_WORDFUNC_S}_preloop:
+ IntOp $5 $5 + 1
+
+ WordFunc_WordReplace${_WORDFUNC_S}_loop:
+ StrCpy $6 $R0 $7 $5
+ StrCmp${_WORDFUNC_S} $6$8 0 WordFunc_WordReplace${_WORDFUNC_S}_error1
+ StrCmp${_WORDFUNC_S} $6 '' WordFunc_WordReplace${_WORDFUNC_S}_minus
+ StrCmp${_WORDFUNC_S} $6 $0 0 WordFunc_WordReplace${_WORDFUNC_S}_preloop
+ IntOp $8 $8 + 1
+ StrCmp${_WORDFUNC_S} $3$8 +$2 WordFunc_WordReplace${_WORDFUNC_S}_found
+ IntOp $5 $5 + $7
+ goto WordFunc_WordReplace${_WORDFUNC_S}_loop
+
+ WordFunc_WordReplace${_WORDFUNC_S}_minus:
+ StrCmp${_WORDFUNC_S} $3 '-' 0 WordFunc_WordReplace${_WORDFUNC_S}_error2
+ StrCpy $3 +
+ IntOp $2 $8 - $2
+ IntOp $2 $2 + 1
+ IntCmp $2 0 WordFunc_WordReplace${_WORDFUNC_S}_error2 WordFunc_WordReplace${_WORDFUNC_S}_error2 WordFunc_WordReplace${_WORDFUNC_S}_one
+
+ WordFunc_WordReplace${_WORDFUNC_S}_found:
+ StrCpy $3 $R0 $5
+ StrCmp${_WORDFUNC_S} $4 '*' 0 +5
+ StrCpy $6 $3 '' -$7
+ StrCmp${_WORDFUNC_S} $6 $0 0 +3
+ StrCpy $3 $3 -$7
+ goto -3
+ IntOp $5 $5 + $7
+ StrCmp${_WORDFUNC_S} $4 '*' 0 +3
+ StrCpy $6 $R0 $7 $5
+ StrCmp${_WORDFUNC_S} $6 $0 -3
+ StrCpy $R0 $R0 '' $5
+ StrCpy $R0 '$3$1$R0'
+ goto WordFunc_WordReplace${_WORDFUNC_S}_end
+
+ WordFunc_WordReplace${_WORDFUNC_S}_error3:
+ StrCpy $R0 3
+ goto WordFunc_WordReplace${_WORDFUNC_S}_error
+ WordFunc_WordReplace${_WORDFUNC_S}_error2:
+ StrCpy $R0 2
+ goto WordFunc_WordReplace${_WORDFUNC_S}_error
+ WordFunc_WordReplace${_WORDFUNC_S}_error1:
+ StrCpy $R0 1
+ WordFunc_WordReplace${_WORDFUNC_S}_error:
+ StrCmp $9 'E' +3
+ StrCpy $R0 $R1
+ goto +2
+ SetErrors
+
+ WordFunc_WordReplace${_WORDFUNC_S}_end:
+ Pop $R1
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+!macroend
+
+!define WordReplace `!insertmacro WordReplaceCall`
+!define un.WordReplace `!insertmacro WordReplaceCall`
+
+!macro WordReplace
+!macroend
+
+!macro un.WordReplace
+!macroend
+
+!macro WordReplace_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordReplaceBody ''
+
+ !verbose pop
+!macroend
+
+!define WordReplaceS `!insertmacro WordReplaceSCall`
+!define un.WordReplaceS `!insertmacro WordReplaceSCall`
+
+!macro WordReplaceS
+!macroend
+
+!macro un.WordReplaceS
+!macroend
+
+!macro WordReplaceS_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordReplaceBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro WordAddBody _WORDFUNC_S
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Exch 2
+ Exch $R0
+ Exch 2
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $R1
+ ClearErrors
+
+ StrCpy $7 ''
+ StrCpy $2 $1 1
+ StrCmp $2 'E' 0 +4
+ StrCpy $7 E
+ StrCpy $1 $1 '' 1
+ goto -4
+
+ StrCpy $5 0
+ StrCpy $R1 $R0
+ StrCpy $2 $1 '' 1
+ StrCpy $1 $1 1
+ StrCmp${_WORDFUNC_S} $1 '+' +2
+ StrCmp${_WORDFUNC_S} $1 '-' 0 WordFunc_WordAdd${_WORDFUNC_S}_error3
+
+ StrCmp${_WORDFUNC_S} $0 '' WordFunc_WordAdd${_WORDFUNC_S}_error1
+ StrCmp${_WORDFUNC_S} $2 '' WordFunc_WordAdd${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $R0 '' 0 +5
+ StrCmp${_WORDFUNC_S} $1 '-' WordFunc_WordAdd${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $1 '+' 0 +3
+ StrCpy $R0 $2
+ goto WordFunc_WordAdd${_WORDFUNC_S}_end
+
+ WordFunc_WordAdd${_WORDFUNC_S}_loop:
+ IntOp $5 $5 + 1
+ !insertmacro WordFind${_WORDFUNC_S}Call 2 $2 $0 E+$5 $3
+ IfErrors 0 WordFunc_WordAdd${_WORDFUNC_S}_/word
+ StrCmp${_WORDFUNC_S} $3 2 +4
+ StrCmp${_WORDFUNC_S} $3$5 11 0 +3
+ StrCpy $3 $2
+ goto WordFunc_WordAdd${_WORDFUNC_S}_/word
+ StrCmp${_WORDFUNC_S} $1 '-' WordFunc_WordAdd${_WORDFUNC_S}_end WordFunc_WordAdd${_WORDFUNC_S}_preend
+
+ WordFunc_WordAdd${_WORDFUNC_S}_/word:
+ !insertmacro WordFind${_WORDFUNC_S}Call 2 $R0 $0 E/$3 $4
+ IfErrors +2
+ StrCmp${_WORDFUNC_S} $1 '-' WordFunc_WordAdd${_WORDFUNC_S}_delete WordFunc_WordAdd${_WORDFUNC_S}_loop
+ StrCmp${_WORDFUNC_S} $1$4 '-1' +2
+ StrCmp${_WORDFUNC_S} $1 '-' WordFunc_WordAdd${_WORDFUNC_S}_loop +4
+ StrCmp${_WORDFUNC_S} $R0 $3 0 WordFunc_WordAdd${_WORDFUNC_S}_loop
+ StrCpy $R0 ''
+ goto WordFunc_WordAdd${_WORDFUNC_S}_end
+ StrCmp${_WORDFUNC_S} $1$4 '+1' 0 +2
+ StrCmp${_WORDFUNC_S} $R0 $3 WordFunc_WordAdd${_WORDFUNC_S}_loop
+ StrCmp${_WORDFUNC_S} $R0 $R1 +3
+ StrCpy $R1 '$R1$0$3'
+ goto WordFunc_WordAdd${_WORDFUNC_S}_loop
+ StrLen $6 $0
+ StrCpy $6 $R0 '' -$6
+ StrCmp${_WORDFUNC_S} $6 $0 0 -4
+ StrCpy $R1 '$R1$3'
+ goto WordFunc_WordAdd${_WORDFUNC_S}_loop
+
+ WordFunc_WordAdd${_WORDFUNC_S}_delete:
+ !insertmacro WordFind${_WORDFUNC_S}Call 2 $R0 $0 E+$4{} $R0
+ goto WordFunc_WordAdd${_WORDFUNC_S}_/word
+
+ WordFunc_WordAdd${_WORDFUNC_S}_error3:
+ StrCpy $R1 3
+ goto WordFunc_WordAdd${_WORDFUNC_S}_error
+ WordFunc_WordAdd${_WORDFUNC_S}_error1:
+ StrCpy $R1 1
+ WordFunc_WordAdd${_WORDFUNC_S}_error:
+ StrCmp $7 'E' 0 WordFunc_WordAdd${_WORDFUNC_S}_end
+ SetErrors
+
+ WordFunc_WordAdd${_WORDFUNC_S}_preend:
+ StrCpy $R0 $R1
+
+ WordFunc_WordAdd${_WORDFUNC_S}_end:
+ Pop $R1
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+!macroend
+
+!define WordAdd `!insertmacro WordAddCall`
+!define un.WordAdd `!insertmacro WordAddCall`
+
+!macro WordAdd
+!macroend
+
+!macro un.WordAdd
+!macroend
+
+!macro WordAdd_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordAddBody ''
+
+ !verbose pop
+!macroend
+
+!define WordAddS `!insertmacro WordAddSCall`
+!define un.WordAddS `!insertmacro WordAddSCall`
+
+!macro WordAddS
+!macroend
+
+!macro un.WordAddS
+!macroend
+
+!macro WordAddS_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordAddBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro WordInsertBody _WORDFUNC_S
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Exch 3
+ Exch $R0
+ Exch 3
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $8
+ Push $9
+ Push $R1
+ ClearErrors
+
+ StrCpy $5 ''
+ StrCpy $6 $0
+ StrCpy $7 }
+
+ StrCpy $9 ''
+ StrCpy $R1 $R0
+ StrCpy $3 $2 1
+ StrCpy $2 $2 '' 1
+ StrCmp $3 'E' 0 +3
+ StrCpy $9 'E'
+ goto -4
+
+ StrCmp${_WORDFUNC_S} $3 '+' +2
+ StrCmp${_WORDFUNC_S} $3 '-' 0 WordFunc_WordInsert${_WORDFUNC_S}_error3
+ IntOp $2 $2 + 0
+ StrCmp${_WORDFUNC_S} $2 0 WordFunc_WordInsert${_WORDFUNC_S}_error2
+ StrCmp${_WORDFUNC_S} $0 '' WordFunc_WordInsert${_WORDFUNC_S}_error1
+
+ StrCmp${_WORDFUNC_S} $2 1 0 WordFunc_WordInsert${_WORDFUNC_S}_two
+ GetLabelAddress $8 WordFunc_WordInsert${_WORDFUNC_S}_oneback
+ StrCmp${_WORDFUNC_S} $3 '+' WordFunc_WordInsert${_WORDFUNC_S}_call
+ StrCpy $7 {
+ goto WordFunc_WordInsert${_WORDFUNC_S}_call
+ WordFunc_WordInsert${_WORDFUNC_S}_oneback:
+ IfErrors 0 +2
+ StrCpy $4 $R0
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +3
+ StrCpy $R0 '$1$0$4'
+ goto WordFunc_WordInsert${_WORDFUNC_S}_end
+ StrCpy $R0 '$4$0$1'
+ goto WordFunc_WordInsert${_WORDFUNC_S}_end
+
+ WordFunc_WordInsert${_WORDFUNC_S}_two:
+ IntOp $2 $2 - 1
+ GetLabelAddress $8 WordFunc_WordInsert${_WORDFUNC_S}_twoback
+ StrCmp${_WORDFUNC_S} $3 '+' 0 WordFunc_WordInsert${_WORDFUNC_S}_call
+ StrCpy $7 {
+ goto WordFunc_WordInsert${_WORDFUNC_S}_call
+ WordFunc_WordInsert${_WORDFUNC_S}_twoback:
+ IfErrors 0 WordFunc_WordInsert${_WORDFUNC_S}_tree
+ StrCmp${_WORDFUNC_S} $2$4 11 0 WordFunc_WordInsert${_WORDFUNC_S}_error2
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +3
+ StrCpy $R0 '$R0$0$1'
+ goto WordFunc_WordInsert${_WORDFUNC_S}_end
+ StrCpy $R0 '$1$0$R0'
+ goto WordFunc_WordInsert${_WORDFUNC_S}_end
+
+ WordFunc_WordInsert${_WORDFUNC_S}_tree:
+ StrCpy $7 }
+ StrCpy $5 $4
+ IntOp $2 $2 + 1
+ GetLabelAddress $8 WordFunc_WordInsert${_WORDFUNC_S}_treeback
+ StrCmp${_WORDFUNC_S} $3 '+' WordFunc_WordInsert${_WORDFUNC_S}_call
+ StrCpy $7 {
+ goto WordFunc_WordInsert${_WORDFUNC_S}_call
+ WordFunc_WordInsert${_WORDFUNC_S}_treeback:
+ IfErrors 0 +3
+ StrCpy $4 ''
+ StrCpy $6 ''
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +3
+ StrCpy $R0 '$5$0$1$6$4'
+ goto WordFunc_WordInsert${_WORDFUNC_S}_end
+ StrCpy $R0 '$4$6$1$0$5'
+ goto WordFunc_WordInsert${_WORDFUNC_S}_end
+
+ WordFunc_WordInsert${_WORDFUNC_S}_call:
+ !insertmacro WordFind${_WORDFUNC_S}Call 2 $R0 $0 E$3$2*$7 $4
+ goto $8
+
+ WordFunc_WordInsert${_WORDFUNC_S}_error3:
+ StrCpy $R0 3
+ goto WordFunc_WordInsert${_WORDFUNC_S}_error
+ WordFunc_WordInsert${_WORDFUNC_S}_error2:
+ StrCpy $R0 2
+ goto WordFunc_WordInsert${_WORDFUNC_S}_error
+ WordFunc_WordInsert${_WORDFUNC_S}_error1:
+ StrCpy $R0 1
+ WordFunc_WordInsert${_WORDFUNC_S}_error:
+ StrCmp $9 'E' +3
+ StrCpy $R0 $R1
+ goto +2
+ SetErrors
+
+ WordFunc_WordInsert${_WORDFUNC_S}_end:
+ Pop $R1
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+!macroend
+
+!define WordInsert `!insertmacro WordInsertCall`
+!define un.WordInsert `!insertmacro WordInsertCall`
+
+!macro WordInsert
+!macroend
+
+!macro un.WordInsert
+!macroend
+
+!macro WordInsert_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordInsertBody ''
+
+ !verbose pop
+!macroend
+
+
+!define WordInsertS `!insertmacro WordInsertSCall`
+!define un.WordInsertS `!insertmacro WordInsertSCall`
+
+!macro WordInsertS
+!macroend
+
+!macro un.WordInsertS
+!macroend
+
+!macro WordInsertS_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro WordInsertBody 'S'
+
+ !verbose pop
+!macroend
+
+!macro StrFilterBody _WORDFUNC_S
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Exch 3
+ Exch $R0
+ Exch 3
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ Push $R1
+ Push $R2
+ Push $R3
+ Push $R4
+ Push $R5
+ Push $R6
+ Push $R7
+ Push $R8
+ ClearErrors
+
+ StrCpy $R2 $0 '' -3
+ StrCmp $R2 "eng" WordFunc_StrFilter${_WORDFUNC_S}_eng
+ StrCmp $R2 "rus" WordFunc_StrFilter${_WORDFUNC_S}_rus
+ WordFunc_StrFilter${_WORDFUNC_S}_eng:
+ StrCpy $4 65
+ StrCpy $5 90
+ StrCpy $6 97
+ StrCpy $7 122
+ goto WordFunc_StrFilter${_WORDFUNC_S}_langend
+ WordFunc_StrFilter${_WORDFUNC_S}_rus:
+ StrCpy $4 192
+ StrCpy $5 223
+ StrCpy $6 224
+ StrCpy $7 255
+ goto WordFunc_StrFilter${_WORDFUNC_S}_langend
+ ;...
+
+ WordFunc_StrFilter${_WORDFUNC_S}_langend:
+ StrCpy $R7 ''
+ StrCpy $R8 ''
+
+ StrCmp${_WORDFUNC_S} $2 '' 0 WordFunc_StrFilter${_WORDFUNC_S}_begin
+
+ WordFunc_StrFilter${_WORDFUNC_S}_restart1:
+ StrCpy $2 ''
+ StrCpy $3 $0 1
+ StrCmp${_WORDFUNC_S} $3 '+' +2
+ StrCmp${_WORDFUNC_S} $3 '-' 0 +3
+ StrCpy $0 $0 '' 1
+ goto +2
+ StrCpy $3 ''
+
+ IntOp $0 $0 + 0
+ StrCmp${_WORDFUNC_S} $0 0 +5
+ StrCpy $R7 $0 1 0
+ StrCpy $R8 $0 1 1
+ StrCpy $R2 $0 1 2
+ StrCmp${_WORDFUNC_S} $R2 '' WordFunc_StrFilter${_WORDFUNC_S}_filter WordFunc_StrFilter${_WORDFUNC_S}_error
+
+ WordFunc_StrFilter${_WORDFUNC_S}_restart2:
+ StrCmp${_WORDFUNC_S} $3 '' WordFunc_StrFilter${_WORDFUNC_S}_end
+ StrCpy $R7 ''
+ StrCpy $R8 '+-'
+ goto WordFunc_StrFilter${_WORDFUNC_S}_begin
+
+ WordFunc_StrFilter${_WORDFUNC_S}_filter:
+ StrCmp${_WORDFUNC_S} $R7 '1' +3
+ StrCmp${_WORDFUNC_S} $R7 '2' +2
+ StrCmp${_WORDFUNC_S} $R7 '3' 0 WordFunc_StrFilter${_WORDFUNC_S}_error
+
+ StrCmp${_WORDFUNC_S} $R8 '' WordFunc_StrFilter${_WORDFUNC_S}_begin
+ StrCmp${_WORDFUNC_S} $R7$R8 '23' +2
+ StrCmp${_WORDFUNC_S} $R7$R8 '32' 0 +3
+ StrCpy $R7 -1
+ goto WordFunc_StrFilter${_WORDFUNC_S}_begin
+ StrCmp${_WORDFUNC_S} $R7$R8 '13' +2
+ StrCmp${_WORDFUNC_S} $R7$R8 '31' 0 +3
+ StrCpy $R7 -2
+ goto WordFunc_StrFilter${_WORDFUNC_S}_begin
+ StrCmp${_WORDFUNC_S} $R7$R8 '12' +2
+ StrCmp${_WORDFUNC_S} $R7$R8 '21' 0 WordFunc_StrFilter${_WORDFUNC_S}_error
+ StrCpy $R7 -3
+
+ WordFunc_StrFilter${_WORDFUNC_S}_begin:
+ StrCpy $R6 0
+ StrCpy $R1 ''
+
+ WordFunc_StrFilter${_WORDFUNC_S}_loop:
+ StrCpy $R2 $R0 1 $R6
+ StrCmp${_WORDFUNC_S} $R2 '' WordFunc_StrFilter${_WORDFUNC_S}_restartchk
+
+ StrCmp${_WORDFUNC_S} $2 '' +7
+ StrCpy $R4 0
+ StrCpy $R5 $2 1 $R4
+ StrCmp${_WORDFUNC_S} $R5 '' WordFunc_StrFilter${_WORDFUNC_S}_addsymbol
+ StrCmp${_WORDFUNC_S} $R5 $R2 WordFunc_StrFilter${_WORDFUNC_S}_skipsymbol
+ IntOp $R4 $R4 + 1
+ goto -4
+
+ StrCmp${_WORDFUNC_S} $1 '' +7
+ StrCpy $R4 0
+ StrCpy $R5 $1 1 $R4
+ StrCmp${_WORDFUNC_S} $R5 '' +4
+ StrCmp${_WORDFUNC_S} $R5 $R2 WordFunc_StrFilter${_WORDFUNC_S}_addsymbol
+ IntOp $R4 $R4 + 1
+ goto -4
+
+ StrCmp${_WORDFUNC_S} $R7 '1' +2
+ StrCmp${_WORDFUNC_S} $R7 '-1' 0 +4
+ StrCpy $R4 48
+ StrCpy $R5 57
+ goto WordFunc_StrFilter${_WORDFUNC_S}_loop2
+ StrCmp${_WORDFUNC_S} $R8 '+-' 0 +2
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +4
+ StrCpy $R4 $4
+ StrCpy $R5 $5
+ goto WordFunc_StrFilter${_WORDFUNC_S}_loop2
+ StrCpy $R4 $6
+ StrCpy $R5 $7
+
+ WordFunc_StrFilter${_WORDFUNC_S}_loop2:
+ IntFmt $R3 '%c' $R4
+ StrCmp $R2 $R3 WordFunc_StrFilter${_WORDFUNC_S}_found
+ StrCmp $R4 $R5 WordFunc_StrFilter${_WORDFUNC_S}_notfound
+ IntOp $R4 $R4 + 1
+ goto WordFunc_StrFilter${_WORDFUNC_S}_loop2
+
+ WordFunc_StrFilter${_WORDFUNC_S}_found:
+ StrCmp${_WORDFUNC_S} $R8 '+-' WordFunc_StrFilter${_WORDFUNC_S}_setcase
+ StrCmp${_WORDFUNC_S} $R7 '3' WordFunc_StrFilter${_WORDFUNC_S}_skipsymbol
+ StrCmp${_WORDFUNC_S} $R7 '-3' WordFunc_StrFilter${_WORDFUNC_S}_addsymbol
+ StrCmp${_WORDFUNC_S} $R8 '' WordFunc_StrFilter${_WORDFUNC_S}_addsymbol WordFunc_StrFilter${_WORDFUNC_S}_skipsymbol
+
+ WordFunc_StrFilter${_WORDFUNC_S}_notfound:
+ StrCmp${_WORDFUNC_S} $R8 '+-' WordFunc_StrFilter${_WORDFUNC_S}_addsymbol
+ StrCmp${_WORDFUNC_S} $R7 '3' 0 +2
+ StrCmp${_WORDFUNC_S} $R5 57 WordFunc_StrFilter${_WORDFUNC_S}_addsymbol +3
+ StrCmp${_WORDFUNC_S} $R7 '-3' 0 +5
+ StrCmp${_WORDFUNC_S} $R5 57 WordFunc_StrFilter${_WORDFUNC_S}_skipsymbol
+ StrCpy $R4 48
+ StrCpy $R5 57
+ goto WordFunc_StrFilter${_WORDFUNC_S}_loop2
+ StrCmp${_WORDFUNC_S} $R8 '' WordFunc_StrFilter${_WORDFUNC_S}_skipsymbol WordFunc_StrFilter${_WORDFUNC_S}_addsymbol
+
+ WordFunc_StrFilter${_WORDFUNC_S}_setcase:
+ StrCpy $R2 $R3
+ WordFunc_StrFilter${_WORDFUNC_S}_addsymbol:
+ StrCpy $R1 $R1$R2
+ WordFunc_StrFilter${_WORDFUNC_S}_skipsymbol:
+ IntOp $R6 $R6 + 1
+ goto WordFunc_StrFilter${_WORDFUNC_S}_loop
+
+ WordFunc_StrFilter${_WORDFUNC_S}_error:
+ SetErrors
+ StrCpy $R0 ''
+ goto WordFunc_StrFilter${_WORDFUNC_S}_end
+
+ WordFunc_StrFilter${_WORDFUNC_S}_restartchk:
+ StrCpy $R0 $R1
+ StrCmp${_WORDFUNC_S} $2 '' 0 WordFunc_StrFilter${_WORDFUNC_S}_restart1
+ StrCmp${_WORDFUNC_S} $R8 '+-' 0 WordFunc_StrFilter${_WORDFUNC_S}_restart2
+
+ WordFunc_StrFilter${_WORDFUNC_S}_end:
+ Pop $R8
+ Pop $R7
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+!macroend
+
+!define StrFilter `!insertmacro StrFilterCall`
+!define un.StrFilter `!insertmacro StrFilterCall`
+
+!macro StrFilter
+!macroend
+
+!macro un.StrFilter
+!macroend
+
+!macro StrFilter_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro StrFilterBody ''
+
+ !verbose pop
+!macroend
+
+
+!define StrFilterS `!insertmacro StrFilterSCall`
+!define un.StrFilterS `!insertmacro StrFilterSCall`
+
+!macro StrFilterS
+!macroend
+
+!macro un.StrFilterS
+!macroend
+
+!macro StrFilterS_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ !insertmacro StrFilterBody 'S'
+
+ !verbose pop
+!macroend
+
+!define VersionCompare `!insertmacro VersionCompareCall`
+!define un.VersionCompare `!insertmacro VersionCompareCall`
+
+!macro VersionCompare
+!macroend
+
+!macro un.VersionCompare
+!macroend
+
+!macro VersionCompare_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+
+ WordFunc_VersionCompare_begin:
+ StrCpy $2 -1
+ IntOp $2 $2 + 1
+ StrCpy $3 $0 1 $2
+ StrCmp $3 '' +2
+ StrCmp $3 '.' 0 -3
+ StrCpy $4 $0 $2
+ IntOp $2 $2 + 1
+ StrCpy $0 $0 '' $2
+
+ StrCpy $2 -1
+ IntOp $2 $2 + 1
+ StrCpy $3 $1 1 $2
+ StrCmp $3 '' +2
+ StrCmp $3 '.' 0 -3
+ StrCpy $5 $1 $2
+ IntOp $2 $2 + 1
+ StrCpy $1 $1 '' $2
+
+ StrCmp $4$5 '' WordFunc_VersionCompare_equal
+
+ StrCpy $6 -1
+ IntOp $6 $6 + 1
+ StrCpy $3 $4 1 $6
+ StrCmp $3 '0' -2
+ StrCmp $3 '' 0 +2
+ StrCpy $4 0
+
+ StrCpy $7 -1
+ IntOp $7 $7 + 1
+ StrCpy $3 $5 1 $7
+ StrCmp $3 '0' -2
+ StrCmp $3 '' 0 +2
+ StrCpy $5 0
+
+ StrCmp $4 0 0 +2
+ StrCmp $5 0 WordFunc_VersionCompare_begin WordFunc_VersionCompare_newer2
+ StrCmp $5 0 WordFunc_VersionCompare_newer1
+ IntCmp $6 $7 0 WordFunc_VersionCompare_newer1 WordFunc_VersionCompare_newer2
+
+ StrCpy $4 '1$4'
+ StrCpy $5 '1$5'
+ IntCmp $4 $5 WordFunc_VersionCompare_begin WordFunc_VersionCompare_newer2 WordFunc_VersionCompare_newer1
+
+ WordFunc_VersionCompare_equal:
+ StrCpy $0 0
+ goto WordFunc_VersionCompare_end
+ WordFunc_VersionCompare_newer1:
+ StrCpy $0 1
+ goto WordFunc_VersionCompare_end
+ WordFunc_VersionCompare_newer2:
+ StrCpy $0 2
+
+ WordFunc_VersionCompare_end:
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!define VersionConvert `!insertmacro VersionConvertCall`
+!define un.VersionConvert `!insertmacro VersionConvertCall`
+
+!macro VersionConvert
+!macroend
+
+!macro un.VersionConvert
+!macroend
+
+!macro VersionConvert_
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+
+ StrCmp $1 '' 0 +2
+ StrCpy $1 'abcdefghijklmnopqrstuvwxyz'
+ StrCpy $1 $1 99
+
+ StrCpy $2 0
+ StrCpy $7 'dot'
+ goto WordFunc_VersionConvert_loop
+
+ WordFunc_VersionConvert_preloop:
+ IntOp $2 $2 + 1
+
+ WordFunc_VersionConvert_loop:
+ StrCpy $3 $0 1 $2
+ StrCmp $3 '' WordFunc_VersionConvert_endcheck
+ StrCmp $3 '.' WordFunc_VersionConvert_dot
+ StrCmp $3 '0' WordFunc_VersionConvert_digit
+ IntCmp $3 '0' WordFunc_VersionConvert_letter WordFunc_VersionConvert_letter WordFunc_VersionConvert_digit
+
+ WordFunc_VersionConvert_dot:
+ StrCmp $7 'dot' WordFunc_VersionConvert_replacespecial
+ StrCpy $7 'dot'
+ goto WordFunc_VersionConvert_preloop
+
+ WordFunc_VersionConvert_digit:
+ StrCmp $7 'letter' WordFunc_VersionConvert_insertdot
+ StrCpy $7 'digit'
+ goto WordFunc_VersionConvert_preloop
+
+ WordFunc_VersionConvert_letter:
+ StrCpy $5 0
+ StrCpy $4 $1 1 $5
+ IntOp $5 $5 + 1
+ StrCmp $4 '' WordFunc_VersionConvert_replacespecial
+ StrCmp $4 $3 0 -3
+ IntCmp $5 9 0 0 +2
+ StrCpy $5 '0$5'
+
+ StrCmp $7 'letter' +2
+ StrCmp $7 'dot' 0 +3
+ StrCpy $6 ''
+ goto +2
+ StrCpy $6 '.'
+
+ StrCpy $4 $0 $2
+ IntOp $2 $2 + 1
+ StrCpy $0 $0 '' $2
+ StrCpy $0 '$4$6$5$0'
+ StrLen $4 '$6$5'
+ IntOp $2 $2 + $4
+ IntOp $2 $2 - 1
+ StrCpy $7 'letter'
+ goto WordFunc_VersionConvert_loop
+
+ WordFunc_VersionConvert_replacespecial:
+ StrCmp $7 'dot' 0 +3
+ StrCpy $6 ''
+ goto +2
+ StrCpy $6 '.'
+
+ StrCpy $4 $0 $2
+ IntOp $2 $2 + 1
+ StrCpy $0 $0 '' $2
+ StrCpy $0 '$4$6$0'
+ StrLen $4 $6
+ IntOp $2 $2 + $4
+ IntOp $2 $2 - 1
+ StrCpy $7 'dot'
+ goto WordFunc_VersionConvert_loop
+
+ WordFunc_VersionConvert_insertdot:
+ StrCpy $4 $0 $2
+ StrCpy $0 $0 '' $2
+ StrCpy $0 '$4.$0'
+ StrCpy $7 'dot'
+ goto WordFunc_VersionConvert_preloop
+
+ WordFunc_VersionConvert_endcheck:
+ StrCpy $4 $0 1 -1
+ StrCmp $4 '.' 0 WordFunc_VersionConvert_end
+ StrCpy $0 $0 -1
+ goto -3
+
+ WordFunc_VersionConvert_end:
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ !verbose pop
+!macroend
+
+!verbose pop
+!endif
diff --git a/KattekerCreator/nsis/Include/nsDialogs.nsh b/KattekerCreator/nsis/Include/nsDialogs.nsh
new file mode 100644
index 0000000..671f8e6
--- /dev/null
+++ b/KattekerCreator/nsis/Include/nsDialogs.nsh
@@ -0,0 +1,1163 @@
+/*
+
+nsDialogs.nsh
+Header file for creating custom installer pages with nsDialogs
+
+*/
+
+!ifndef NSDIALOGS_INCLUDED
+!verbose push 2
+!define NSDIALOGS_INCLUDED
+!verbose 3
+
+!include LogicLib.nsh
+!include WinMessages.nsh
+
+!define /ifndef WS_EX_DLGMODALFRAME 0x00000001
+!define /ifndef WS_EX_NOPARENTNOTIFY 0x00000004
+!define /ifndef WS_EX_TOPMOST 0x00000008
+!define /ifndef WS_EX_ACCEPTFILES 0x00000010
+!define /ifndef WS_EX_TRANSPARENT 0x00000020
+!define /ifndef WS_EX_MDICHILD 0x00000040
+!define /ifndef WS_EX_TOOLWINDOW 0x00000080
+!define /ifndef WS_EX_WINDOWEDGE 0x00000100
+!define /ifndef WS_EX_CLIENTEDGE 0x00000200
+!define /ifndef WS_EX_CONTEXTHELP 0x00000400
+!define /ifndef WS_EX_RIGHT 0x00001000
+!define /ifndef WS_EX_LEFT 0x00000000
+!define /ifndef WS_EX_RTLREADING 0x00002000
+!define /ifndef WS_EX_LTRREADING 0x00000000
+!define /ifndef WS_EX_LEFTSCROLLBAR 0x00004000
+!define /ifndef WS_EX_RIGHTSCROLLBAR 0x00000000
+!define /ifndef WS_EX_CONTROLPARENT 0x00010000
+!define /ifndef WS_EX_STATICEDGE 0x00020000
+!define /ifndef WS_EX_APPWINDOW 0x00040000
+
+!define /ifndef WS_CHILD 0x40000000
+!define /ifndef WS_VISIBLE 0x10000000
+!define /ifndef WS_DISABLED 0x08000000
+!define /ifndef WS_CLIPSIBLINGS 0x04000000
+!define /ifndef WS_CLIPCHILDREN 0x02000000
+!define /ifndef WS_MAXIMIZE 0x01000000
+!define /ifndef WS_VSCROLL 0x00200000
+!define /ifndef WS_HSCROLL 0x00100000
+!define /ifndef WS_GROUP 0x00020000
+!define /ifndef WS_TABSTOP 0x00010000
+
+!define ES_LEFT 0x00000000
+!define ES_CENTER 0x00000001
+!define ES_RIGHT 0x00000002
+!define ES_MULTILINE 0x00000004
+!define ES_UPPERCASE 0x00000008
+!define ES_LOWERCASE 0x00000010
+!define ES_PASSWORD 0x00000020
+!define ES_AUTOVSCROLL 0x00000040
+!define ES_AUTOHSCROLL 0x00000080
+!define ES_NOHIDESEL 0x00000100
+!define ES_OEMCONVERT 0x00000400
+!define ES_READONLY 0x00000800
+!define ES_WANTRETURN 0x00001000
+!define ES_NUMBER 0x00002000
+!define ES_SAVESEL 0x00008000
+
+!define SS_LEFT 0x00000000
+!define SS_CENTER 0x00000001
+!define SS_RIGHT 0x00000002
+!define SS_ICON 0x00000003
+!define SS_BLACKRECT 0x00000004
+!define SS_GRAYRECT 0x00000005
+!define SS_WHITERECT 0x00000006
+!define SS_BLACKFRAME 0x00000007
+!define SS_GRAYFRAME 0x00000008
+!define SS_WHITEFRAME 0x00000009
+!define SS_USERITEM 0x0000000A
+!define SS_SIMPLE 0x0000000B
+!define SS_LEFTNOWORDWRAP 0x0000000C
+!define SS_OWNERDRAW 0x0000000D
+!define SS_BITMAP 0x0000000E
+!define SS_ENHMETAFILE 0x0000000F
+!define SS_ETCHEDHORZ 0x00000010
+!define SS_ETCHEDVERT 0x00000011
+!define SS_ETCHEDFRAME 0x00000012
+!define SS_TYPEMASK 0x0000001F
+!define SS_REALSIZECONTROL 0x00000040
+!define SS_NOPREFIX 0x00000080
+!define SS_NOTIFY 0x00000100
+!define SS_CENTERIMAGE 0x00000200
+!define SS_RIGHTJUST 0x00000400
+!define SS_REALSIZEIMAGE 0x00000800
+!define SS_SUNKEN 0x00001000
+!define SS_EDITCONTROL 0x00002000
+!define SS_ENDELLIPSIS 0x00004000
+!define SS_PATHELLIPSIS 0x00008000
+!define SS_WORDELLIPSIS 0x0000C000
+!define SS_ELLIPSISMASK 0x0000C000
+
+!define BS_PUSHBUTTON 0x00000000
+!define BS_DEFPUSHBUTTON 0x00000001
+!define BS_CHECKBOX 0x00000002
+!define BS_AUTOCHECKBOX 0x00000003
+!define BS_RADIOBUTTON 0x00000004
+!define BS_3STATE 0x00000005
+!define BS_AUTO3STATE 0x00000006
+!define BS_GROUPBOX 0x00000007
+!define BS_USERBUTTON 0x00000008
+!define BS_AUTORADIOBUTTON 0x00000009
+!define BS_PUSHBOX 0x0000000A
+!define BS_OWNERDRAW 0x0000000B
+!define BS_TYPEMASK 0x0000000F
+!define BS_LEFTTEXT 0x00000020
+!define BS_TEXT 0x00000000
+!define BS_ICON 0x00000040
+!define BS_BITMAP 0x00000080
+!define BS_LEFT 0x00000100
+!define BS_RIGHT 0x00000200
+!define BS_CENTER 0x00000300
+!define BS_TOP 0x00000400
+!define BS_BOTTOM 0x00000800
+!define BS_VCENTER 0x00000C00
+!define BS_PUSHLIKE 0x00001000
+!define BS_MULTILINE 0x00002000
+!define BS_NOTIFY 0x00004000
+!define BS_FLAT 0x00008000
+!define BS_RIGHTBUTTON ${BS_LEFTTEXT}
+
+!define CBS_SIMPLE 0x0001
+!define CBS_DROPDOWN 0x0002
+!define CBS_DROPDOWNLIST 0x0003
+!define CBS_OWNERDRAWFIXED 0x0010
+!define CBS_OWNERDRAWVARIABLE 0x0020
+!define CBS_AUTOHSCROLL 0x0040
+!define CBS_OEMCONVERT 0x0080
+!define CBS_SORT 0x0100
+!define CBS_HASSTRINGS 0x0200
+!define CBS_NOINTEGRALHEIGHT 0x0400
+!define CBS_DISABLENOSCROLL 0x0800
+!define CBS_UPPERCASE 0x2000
+!define CBS_LOWERCASE 0x4000
+
+!define LBS_NOTIFY 0x0001
+!define LBS_SORT 0x0002
+!define LBS_NOREDRAW 0x0004
+!define LBS_MULTIPLESEL 0x0008
+!define LBS_OWNERDRAWFIXED 0x0010
+!define LBS_OWNERDRAWVARIABLE 0x0020
+!define LBS_HASSTRINGS 0x0040
+!define LBS_USETABSTOPS 0x0080
+!define LBS_NOINTEGRALHEIGHT 0x0100
+!define LBS_MULTICOLUMN 0x0200
+!define LBS_WANTKEYBOARDINPUT 0x0400
+!define LBS_EXTENDEDSEL 0x0800
+!define LBS_DISABLENOSCROLL 0x1000
+!define LBS_NODATA 0x2000
+!define LBS_NOSEL 0x4000
+!define LBS_COMBOBOX 0x8000
+
+!define ACS_CENTER 0x0001
+!define ACS_TRANSPARENT 0x0002 ; The parent of the animation control must not have the WS_CLIPCHILDREN style
+!define ACS_AUTOPLAY 0x0004
+!define ACS_TIMER 0x0008 ; < CC6
+
+!define TBS_AUTOTICKS 0x0001
+!define TBS_VERT 0x0002
+!define TBS_HORZ 0x0000
+!define TBS_TOP 0x0004
+!define TBS_BOTTOM 0x0000
+!define TBS_LEFT 0x0004
+!define TBS_RIGHT 0x0000
+!define TBS_BOTH 0x0008
+!define TBS_NOTICKS 0x0010
+!define TBS_ENABLESELRANGE 0x0020
+!define TBS_FIXEDLENGTH 0x0040
+!define TBS_NOTHUMB 0x0080
+!define TBS_TOOLTIPS 0x0100 ; IE3
+!define TBS_REVERSED 0x0200 ; IE5
+!define TBS_DOWNISLEFT 0x0400 ; _WIN32_IE >= 0x0501
+!define TBS_NOTIFYBEFOREMOVE 0x0800 ; IE6?
+!define TBS_TRANSPARENTBKGND 0x1000 ; Vista
+
+!define UDS_WRAP 0x0001
+!define UDS_SETBUDDYINT 0x0002
+!define UDS_ALIGNRIGHT 0x0004
+!define UDS_ALIGNLEFT 0x0008
+!define UDS_AUTOBUDDY 0x0010
+!define UDS_ARROWKEYS 0x0020
+!define UDS_HORZ 0x0040
+!define UDS_NOTHOUSANDS 0x0080
+!define UDS_HOTTRACK 0x0100 ; 98+
+
+!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 /ifndef IMAGE_BITMAP 0
+!define /ifndef IMAGE_ICON 1
+!define /ifndef IMAGE_CURSOR 2
+!define /ifndef IMAGE_ENHMETAFILE 3
+
+!define /ifndef GWL_STYLE -16
+!define /ifndef GWL_EXSTYLE -20
+
+!define /ifndef ICC_BAR_CLASSES 0x0004
+!define /ifndef ICC_UPDOWN_CLASS 0x0010
+!define /ifndef ICC_HOTKEY_CLASS 0x0040
+!define /ifndef ICC_ANIMATE_CLASS 0x0080
+!define /ifndef ICC_DATE_CLASSES 0x0100
+!define /ifndef ICC_USEREX_CLASSES 0x0200
+!define /ifndef ICC_INTERNET_CLASSES 0x0800
+!define /ifndef ICC_LINK_CLASS 0x8000
+
+
+!define DEFAULT_STYLES ${WS_CHILD}|${WS_VISIBLE}|${WS_CLIPSIBLINGS}
+
+!define __NSD_HLine_CLASS STATIC
+!define __NSD_HLine_STYLE ${DEFAULT_STYLES}|${SS_ETCHEDHORZ}|${SS_SUNKEN}
+!define __NSD_HLine_EXSTYLE ${WS_EX_TRANSPARENT}
+
+!define __NSD_VLine_CLASS STATIC
+!define __NSD_VLine_STYLE ${DEFAULT_STYLES}|${SS_ETCHEDVERT}|${SS_SUNKEN}
+!define __NSD_VLine_EXSTYLE ${WS_EX_TRANSPARENT}
+
+!define __NSD_Label_CLASS STATIC
+!define __NSD_Label_STYLE ${DEFAULT_STYLES}|${SS_NOTIFY}
+!define __NSD_Label_EXSTYLE ${WS_EX_TRANSPARENT}
+
+!define __NSD_Icon_CLASS STATIC
+!define __NSD_Icon_STYLE ${DEFAULT_STYLES}|${SS_ICON}|${SS_NOTIFY}
+!define __NSD_Icon_EXSTYLE 0
+
+!define __NSD_Bitmap_CLASS STATIC
+!define __NSD_Bitmap_STYLE ${DEFAULT_STYLES}|${SS_BITMAP}|${SS_NOTIFY}
+!define __NSD_Bitmap_EXSTYLE 0
+
+!define __NSD_BrowseButton_CLASS BUTTON
+!define __NSD_BrowseButton_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}
+!define __NSD_BrowseButton_EXSTYLE 0
+
+!define __NSD_Link_CLASS LINK
+!define __NSD_Link_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${BS_OWNERDRAW}
+!define __NSD_Link_EXSTYLE 0
+
+!define __NSD_Button_CLASS BUTTON
+!define __NSD_Button_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}
+!define __NSD_Button_EXSTYLE 0
+
+!define __NSD_GroupBox_CLASS BUTTON
+!define __NSD_GroupBox_STYLE ${DEFAULT_STYLES}|${BS_GROUPBOX}
+!define __NSD_GroupBox_EXSTYLE ${WS_EX_TRANSPARENT}
+
+!define __NSD_CheckBox_CLASS BUTTON
+!define __NSD_CheckBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${BS_TEXT}|${BS_VCENTER}|${BS_AUTOCHECKBOX}|${BS_MULTILINE}
+!define __NSD_CheckBox_EXSTYLE 0
+
+!define __NSD_RadioButton_CLASS BUTTON
+!define __NSD_RadioButton_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${BS_TEXT}|${BS_VCENTER}|${BS_AUTORADIOBUTTON}|${BS_MULTILINE}
+!define __NSD_RadioButton_EXSTYLE 0
+
+!define __NSD_Text_CLASS EDIT
+!define __NSD_Text_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}
+!define __NSD_Text_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_Password_CLASS EDIT
+!define __NSD_Password_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_PASSWORD}
+!define __NSD_Password_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_Number_CLASS EDIT
+!define __NSD_Number_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_NUMBER}
+!define __NSD_Number_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_FileRequest_CLASS EDIT
+!define __NSD_FileRequest_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}
+!define __NSD_FileRequest_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_DirRequest_CLASS EDIT
+!define __NSD_DirRequest_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}
+!define __NSD_DirRequest_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_RichEdit_CLASS_10 "RICHEDIT" ; 1.0 (Riched32.dll) Win95/NT4
+!define __NSD_RichEdit_CLASS_20A "RICHEDIT20A" ; 2.0 (Riched20.dll) Win98/NT4 (NSIS makes sure this is registered even on Windows 95)
+!define __NSD_RichEdit_CLASS_20W "RICHEDIT20W"
+!define __NSD_RichEdit_CLASS_41W "RICHEDIT50W" ; 4.1 (MsftEdit.DLL) WinXP.SP1
+!ifdef NSIS_UNICODE
+!define /ifndef __NSD_RichEdit_CLASS ${__NSD_RichEdit_CLASS_20W}
+!else
+!define /ifndef __NSD_RichEdit_CLASS ${__NSD_RichEdit_CLASS_20A}
+!endif
+!define __NSD_RichEdit_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_AUTOHSCROLL}|${ES_AUTOVSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN}|${ES_SAVESEL}|${WS_HSCROLL}|${WS_VSCROLL}
+!define __NSD_RichEdit_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_ComboBox_CLASS COMBOBOX
+!define __NSD_ComboBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}|${CBS_DROPDOWN}
+!define __NSD_ComboBox_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_DropList_CLASS COMBOBOX
+!define __NSD_DropList_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}|${CBS_DROPDOWNLIST}
+!define __NSD_DropList_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_ListBox_CLASS LISTBOX
+!define __NSD_ListBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${LBS_DISABLENOSCROLL}|${LBS_HASSTRINGS}|${LBS_NOINTEGRALHEIGHT}|${LBS_NOTIFY}
+!define __NSD_ListBox_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_SortedListBox_CLASS LISTBOX
+!define __NSD_SortedListBox_STYLE ${__NSD_ListBox_STYLE}|${LBS_SORT}
+!define __NSD_SortedListBox_EXSTYLE ${__NSD_ListBox_EXSTYLE}
+
+!define __NSD_ProgressBar_CLASS msctls_progress32
+!define __NSD_ProgressBar_STYLE ${DEFAULT_STYLES}
+!define __NSD_ProgressBar_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_Animation_CLASS SysAnimate32
+!define __NSD_Animation_STYLE ${DEFAULT_STYLES}|${ACS_TRANSPARENT}|${ACS_AUTOPLAY}
+!define __NSD_Animation_EXSTYLE 0
+
+!define __NSD_HTrackBar_CLASS msctls_trackbar32
+!define __NSD_HTrackBar_STYLE ${DEFAULT_STYLES}|${TBS_HORZ}|${TBS_AUTOTICKS}|${TBS_TOOLTIPS}
+!define __NSD_HTrackBar_EXSTYLE 0
+
+!define __NSD_VTrackBar_CLASS msctls_trackbar32
+!define __NSD_VTrackBar_STYLE ${DEFAULT_STYLES}|${TBS_VERT}|${TBS_AUTOTICKS}|${TBS_TOOLTIPS}
+!define __NSD_VTrackBar_EXSTYLE 0
+
+!define __NSD_UpDown_CLASS msctls_updown32
+!define __NSD_UpDown_STYLE ${DEFAULT_STYLES}|${UDS_SETBUDDYINT}|${UDS_ARROWKEYS}|${UDS_NOTHOUSANDS}|${UDS_ALIGNRIGHT}
+!define __NSD_UpDown_EXSTYLE 0
+
+!define __NSD_AutoUpDown_CLASS msctls_updown32
+!define __NSD_AutoUpDown_STYLE ${__NSD_UpDown_STYLE}|${UDS_AUTOBUDDY}
+!define __NSD_AutoUpDown_EXSTYLE ${__NSD_UpDown_EXSTYLE}
+
+!define __NSD_HotKey_CLASS msctls_hotkey32
+!define __NSD_HotKey_STYLE ${DEFAULT_STYLES}
+!define __NSD_HotKey_EXSTYLE ${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE}
+
+!define __NSD_IPAddress_CLASS SysIPAddress32 ; IE4+/CC4.71+
+!define __NSD_IPAddress_STYLE ${DEFAULT_STYLES}
+!define __NSD_IPAddress_EXSTYLE 0
+
+
+!macro __NSD_DefineControl NAME
+ !define NSD_Create${NAME} "nsDialogs::CreateControl ${__NSD_${Name}_CLASS} ${__NSD_${Name}_STYLE} ${__NSD_${Name}_EXSTYLE}"
+!macroend
+!insertmacro __NSD_DefineControl HLine
+!insertmacro __NSD_DefineControl VLine
+!insertmacro __NSD_DefineControl Label
+!insertmacro __NSD_DefineControl Icon
+!insertmacro __NSD_DefineControl Bitmap
+!insertmacro __NSD_DefineControl BrowseButton
+!insertmacro __NSD_DefineControl Link
+!insertmacro __NSD_DefineControl Button
+!insertmacro __NSD_DefineControl GroupBox
+!insertmacro __NSD_DefineControl CheckBox
+!insertmacro __NSD_DefineControl RadioButton
+!insertmacro __NSD_DefineControl Text
+!insertmacro __NSD_DefineControl Password
+!insertmacro __NSD_DefineControl Number
+!insertmacro __NSD_DefineControl FileRequest
+!insertmacro __NSD_DefineControl DirRequest
+!insertmacro __NSD_DefineControl RichEdit
+!insertmacro __NSD_DefineControl ComboBox
+!insertmacro __NSD_DefineControl DropList
+!insertmacro __NSD_DefineControl ListBox
+!insertmacro __NSD_DefineControl SortedListBox
+!insertmacro __NSD_DefineControl ProgressBar
+!insertmacro __NSD_DefineControl Animation
+!insertmacro __NSD_DefineControl HTrackBar
+!insertmacro __NSD_DefineControl VTrackBar
+!insertmacro __NSD_DefineControl UpDown
+!insertmacro __NSD_DefineControl AutoUpDown
+!insertmacro __NSD_DefineControl HotKey
+!insertmacro __NSD_DefineControl IPAddress
+
+
+!macro __NSD_OnControlEvent EVENT HWND FUNCTION
+ Push $0
+ Push $1
+
+ StrCpy $1 "${HWND}"
+
+ GetFunctionAddress $0 "${FUNCTION}"
+ nsDialogs::On${EVENT} $1 $0
+
+ Pop $1
+ Pop $0
+!macroend
+
+!macro __NSD_DefineControlCallback EVENT
+ !define NSD_On${EVENT} `!insertmacro __NSD_OnControlEvent ${EVENT} `
+!macroend
+
+!macro __NSD_OnDialogEvent EVENT FUNCTION
+ Push $0
+
+ GetFunctionAddress $0 "${FUNCTION}"
+ nsDialogs::On${EVENT} $0
+
+ Pop $0
+!macroend
+
+!macro __NSD_DefineDialogCallback EVENT
+ !define NSD_On${EVENT} `!insertmacro __NSD_OnDialogEvent ${EVENT} `
+!macroend
+!insertmacro __NSD_DefineControlCallback Click
+!insertmacro __NSD_DefineControlCallback Change
+!insertmacro __NSD_DefineControlCallback Notify
+!insertmacro __NSD_DefineDialogCallback Back
+
+!define NSD_Return "!insertmacro NSD_Return "
+!macro NSD_Return val
+StrCpy $_OUTDIR ${val}
+SetSilent silent
+Return
+!macroend
+
+
+!define __NSD_MkCtlCmd "!insertmacro __NSD_MkCtlCmd "
+!macro __NSD_MkCtlCmd msg wp lp hCtl
+SendMessage ${hCtl} ${${msg}} ${wp} ${lp}
+!macroend
+!define __NSD_MkCtlCmd_WP "!insertmacro __NSD_MkCtlCmd_WP "
+!macro __NSD_MkCtlCmd_WP msg lp hCtl wp
+SendMessage ${hCtl} ${${msg}} ${wp} ${lp}
+!macroend
+!define __NSD_MkCtlCmd_LP "!insertmacro __NSD_MkCtlCmd_LP "
+!macro __NSD_MkCtlCmd_LP msg wp hCtl lp
+SendMessage ${hCtl} ${${msg}} ${wp} ${lp}
+!macroend
+!define __NSD_MkCtlCmd_WPLP "!insertmacro __NSD_MkCtlCmd_WPLP "
+!macro __NSD_MkCtlCmd_WPLP msg hCtl wp lp
+SendMessage ${hCtl} ${${msg}} ${wp} ${lp}
+!macroend
+!define __NSD_MkCtlCmd_RV "!insertmacro __NSD_MkCtlCmd_RV "
+!macro __NSD_MkCtlCmd_RV msg wp lp hCtl VAR
+SendMessage ${hCtl} ${${msg}} ${wp} ${lp} ${VAR}
+!macroend
+
+
+!define NSD_InitCommonControlsEx "!insertmacro __NSD_InitCommonControlsEx "
+!macro __NSD_InitCommonControlsEx ICC
+System::Int64Op ${ICC} << 32
+System::Int64Op 0x08 |
+System::Call 'COMCTL32::InitCommonControlsEx(*ls)' ; INITCOMMONCONTROLSEX as UINT64
+!macroend
+
+
+!define NSD_CreateTimer `!insertmacro _NSD_CreateTimer `
+!macro _NSD_CreateTimer FUNCTION INTERVAL
+ Push $0
+
+ GetFunctionAddress $0 "${FUNCTION}"
+ nsDialogs::CreateTimer $0 "${INTERVAL}"
+
+ Pop $0
+!macroend
+
+
+!define NSD_KillTimer `!insertmacro _NSD_KillTimer `
+!macro _NSD_KillTimer FUNCTION
+ Push $0
+
+ GetFunctionAddress $0 "${FUNCTION}"
+ nsDialogs::KillTimer $0
+
+ Pop $0
+!macroend
+
+
+!define NSD_AddStyle "!insertmacro _NSD_GWLAddFlags ${GWL_STYLE} "
+!define NSD_AddExStyle "!insertmacro _NSD_GWLAddFlags ${GWL_EXSTYLE} "
+!macro _NSD_GWLAddFlags GWL HWND DATA
+ System::Call "user32::GetWindowLong(p${HWND},i${GWL})p.s"
+ System::Int64Op "${DATA}" |
+ System::Call "user32::SetWindowLong(p${HWND},p${GWL},ps)"
+!macroend
+
+!define NSD_GetStyle "!insertmacro _NSD_GWLGetFlags ${GWL_STYLE} "
+!define NSD_GetExStyle "!insertmacro _NSD_GWLGetFlags ${GWL_EXSTYLE} "
+!macro _NSD_GWLGetFlags GWL HWND RET
+System::Call "user32::GetWindowLong(p${HWND},i${GWL})p.s"
+Pop ${RET}
+!macroend
+
+!macro __NSD_GetStyleBit GWL BIT HWND RET
+!insertmacro _NSD_GWLGetFlags ${GWL} ${HWND} ${RET}
+IntOp ${RET} ${RET} & ${BIT}
+!macroend
+
+
+!define NSD_SetFocus `!insertmacro __NSD_SetFocus `
+!macro __NSD_SetFocus HWND
+ System::Call "user32::SetFocus(p${HWND})"
+!macroend
+
+
+!define NSD_GetText "!insertmacro __NSD_GetText "
+!macro __NSD_GetText CONTROL VAR
+ System::Call user32::GetWindowText(p${CONTROL},t.s,i${NSIS_MAX_STRLEN})
+ Pop ${VAR}
+!macroend
+
+
+!define NSD_SetText "!insertmacro __NSD_SetText "
+!macro __NSD_SetText CONTROL TEXT
+ SendMessage ${CONTROL} ${WM_SETTEXT} 0 `STR:${TEXT}`
+!macroend
+
+
+### Edit ###
+
+!define NSD_Edit_GetTextLimit `${__NSD_MkCtlCmd_RV} EM_GETLIMITTEXT 0 0 `
+!define NSD_Edit_SetTextLimit `${__NSD_MkCtlCmd_WP} EM_SETLIMITTEXT 0 `
+!define NSD_Edit_SetPasswordChar `${__NSD_MkCtlCmd_WP} EM_SETPASSWORDCHAR 0 `
+!define NSD_Edit_GetReadOnly `!insertmacro __NSD_GetStyleBit ${GWL_STYLE} ${ES_READONLY} ` ; Non-zero if read-only
+!define NSD_Edit_SetReadOnly `${__NSD_MkCtlCmd_WP} EM_SETREADONLY 0 ` ; Toggles the ES_READONLY style
+!define NSD_Edit_GetModify `${__NSD_MkCtlCmd_RV} EM_GETMODIFY 0 0 `
+!define NSD_Edit_SetModify `${__NSD_MkCtlCmd_WP} EM_SETMODIFY 0 `
+!define NSD_Edit_EmptyUndoBuffer `${__NSD_MkCtlCmd} EM_EMPTYUNDOBUFFER 0 0 `
+!define NSD_Edit_CanUndo `${__NSD_MkCtlCmd_RV} EM_CANUNDO 0 0 `
+!define NSD_Edit_ScrollCaret `${__NSD_MkCtlCmd} EM_SCROLLCARET 0 0 `
+!define NSD_Edit_SetSel `${__NSD_MkCtlCmd_WPLP} EM_SETSEL ` ; WP:Start LP:End
+
+!define NSD_Edit_SetCueBannerText "!insertmacro __NSD_Edit_SetCueBannerText " ; CC6+
+!macro __NSD_Edit_SetCueBannerText CONTROL SHOWWHENFOCUSED TEXT
+!if ${NSIS_CHAR_SIZE} > 1
+ SendMessage ${CONTROL} ${EM_SETCUEBANNER} ${SHOWWHENFOCUSED} `STR:${TEXT}`
+!else
+ System::Call 'USER32::SendMessage(p${CONTROL},i${EM_SETCUEBANNER},p${SHOWWHENFOCUSED},ws)' `${TEXT}` ; Must be PWSTR
+!endif
+!macroend
+
+!define NSD_SetTextLimit `${NSD_Edit_SetTextLimit} ` ; Legacy alias
+
+
+### RichEdit ###
+
+!define NSD_RichEd_SetTextLimit `${__NSD_MkCtlCmd_LP} EM_EXLIMITTEXT 0 `
+!define NSD_RichEd_GetEventMask `${__NSD_MkCtlCmd_RV} EM_GETEVENTMASK 0 0 `
+!define NSD_RichEd_SetEventMask `${__NSD_MkCtlCmd_LP} EM_SETEVENTMASK 0 ` ; LP:ENM_*
+!define NSD_RichEd_SetSystemBackgroundColor `${__NSD_MkCtlCmd} EM_SETBKGNDCOLOR 1 0 ` ; COLOR_WINDOW
+!define NSD_RichEd_SetCustomBackgroundColor `${__NSD_MkCtlCmd_LP} EM_SETBKGNDCOLOR 0 ` ; LP:COLORREF
+!define NSD_RichEd_SetHideSelection `${__NSD_MkCtlCmd_WP} EM_HIDESELECTION 0 ` ; WP(BOOL):HideSelWithoutFocus (Toggles ES_NOHIDESEL & TXTBIT_HIDESELECTION)
+
+
+### CheckBox ###
+
+!define NSD_GetState `!insertmacro __NSD_GetState `
+!macro __NSD_GetState CONTROL VAR
+ SendMessage ${CONTROL} ${BM_GETCHECK} 0 0 ${VAR}
+!macroend
+
+
+!define NSD_SetState `!insertmacro __NSD_SetState `
+!macro __NSD_SetState CONTROL STATE
+ SendMessage ${CONTROL} ${BM_SETCHECK} ${STATE} 0
+!macroend
+
+!define NSD_Check `!insertmacro __NSD_Check `
+!macro __NSD_Check CONTROL
+ ${NSD_SetState} ${CONTROL} ${BST_CHECKED}
+!macroend
+
+
+!define NSD_Uncheck `!insertmacro __NSD_Uncheck `
+!macro __NSD_Uncheck CONTROL
+ ${NSD_SetState} ${CONTROL} ${BST_UNCHECKED}
+!macroend
+
+!define NSD_GetChecked `!insertmacro __NSD_GetState `
+!define NSD_SetChecked `!insertmacro __NSD_SetState `
+
+
+### ComboBox ###
+
+!define NSD_CB_AddString "!insertmacro _NSD_CB_AddString "
+!macro _NSD_CB_AddString CONTROL STRING
+ SendMessage ${CONTROL} ${CB_ADDSTRING} 0 `STR:${STRING}`
+!macroend
+
+
+!define NSD_CB_InsertString "!insertmacro _NSD_CB_InsertString "
+!macro _NSD_CB_InsertString CONTROL INDEX STRING
+SendMessage ${CONTROL} ${CB_INSERTSTRING} ${INDEX} `STR:${STRING}`
+!macroend
+
+!define NSD_CB_PrependString "!insertmacro _NSD_CB_PrependString "
+!macro _NSD_CB_PrependString CONTROL STRING
+SendMessage ${CONTROL} ${CB_INSERTSTRING} 0 `STR:${STRING}`
+!macroend
+
+!define NSD_CB_AppendString "!insertmacro _NSD_CB_AppendString "
+!macro _NSD_CB_AppendString CONTROL STRING
+SendMessage ${CONTROL} ${CB_INSERTSTRING} -1 `STR:${STRING}`
+!macroend
+
+
+!define NSD_CB_SelectString "!insertmacro _NSD_CB_SelectString "
+!macro _NSD_CB_SelectString CONTROL STRING
+ SendMessage ${CONTROL} ${CB_SELECTSTRING} -1 `STR:${STRING}`
+!macroend
+
+
+!define NSD_CB_GetSelectionIndex `!insertmacro __NSD_CB_GetSelectionIndex `
+!macro __NSD_CB_GetSelectionIndex CONTROL VAR
+ SendMessage ${CONTROL} ${CB_GETCURSEL} 0 0 ${VAR}
+!macroend
+
+
+!define NSD_CB_SetSelectionIndex `!insertmacro __NSD_CB_SetSelectionIndex `
+!macro __NSD_CB_SetSelectionIndex CONTROL INDEX
+ SendMessage ${CONTROL} ${CB_SETCURSEL} ${INDEX} 0
+!macroend
+
+
+!define NSD_CB_GetItemData `!insertmacro __NSD_CB_GetItemData `
+!macro NSD_CB_GetItemData CONTROL INDEX VAR
+SendMessage ${CONTROL} ${CB_GETITEMDATA} ${INDEX} 0 ${VAR}
+!macroend
+
+
+!define NSD_CB_SetItemData `!insertmacro __NSD_CB_SetItemData `
+!macro NSD_CB_SetItemData CONTROL INDEX DATA
+SendMessage ${CONTROL} ${CB_SETITEMDATA} ${INDEX} ${DATA}
+!macroend
+
+!define NSD_CB_DelItem `${__NSD_MkCtlCmd_WP} CB_DELETESTRING 0 `
+!define NSD_CB_LimitText `${__NSD_MkCtlCmd_WP} CB_LIMITTEXT 0 `
+!define /IfNDef NSD_CB_Clear `${__NSD_MkCtlCmd} CB_RESETCONTENT 0 0 `
+!define /IfNDef NSD_CB_GetCount `${__NSD_MkCtlCmd_RV} CB_GETCOUNT 0 0 `
+;define /IfNDef NSD_CB_DelString ; /IfNDef to try to stay compatible with
+;define /IfNDef NSD_CB_GetSelection ; the ListView header from the Wiki.
+
+
+### ListBox ###
+
+!define NSD_LB_AddString "!insertmacro _NSD_LB_AddString "
+!macro _NSD_LB_AddString CONTROL STRING
+ SendMessage ${CONTROL} ${LB_ADDSTRING} 0 `STR:${STRING}`
+!macroend
+
+
+!define NSD_LB_InsertString "!insertmacro _NSD_LB_InsertString "
+!macro _NSD_LB_InsertString CONTROL INDEX STRING
+SendMessage ${CONTROL} ${LB_INSERTSTRING} ${INDEX} `STR:${STRING}`
+!macroend
+
+!define NSD_LB_PrependString "!insertmacro _NSD_LB_PrependString "
+!macro _NSD_LB_PrependString CONTROL STRING
+SendMessage ${CONTROL} ${LB_INSERTSTRING} 0 `STR:${STRING}`
+!macroend
+
+!define NSD_LB_AppendString "!insertmacro _NSD_LB_AppendString "
+!macro _NSD_LB_AppendString CONTROL STRING
+SendMessage ${CONTROL} ${LB_INSERTSTRING} -1 `STR:${STRING}`
+!macroend
+
+
+!define NSD_LB_DelString `!insertmacro __NSD_LB_DelString `
+!macro __NSD_LB_DelString CONTROL STRING
+ System::Call 'USER32::SendMessage(p${CONTROL},i${LB_FINDSTRINGEXACT},p-1,ts)p.s' `${STRING}`
+ System::Call 'USER32::SendMessage(p${CONTROL},i${LB_DELETESTRING},ps,p0)'
+!macroend
+
+
+!define NSD_LB_DelItem "!insertmacro __NSD_LB_DelItem "
+!macro __NSD_LB_DelItem CONTROL INDEX
+ SendMessage ${CONTROL} ${LB_DELETESTRING} ${INDEX} 0
+!macroend
+
+
+!define NSD_LB_Clear `${__NSD_MkCtlCmd} LB_RESETCONTENT 0 0 `
+
+
+!define NSD_LB_GetCount `!insertmacro __NSD_LB_GetCount `
+!macro __NSD_LB_GetCount CONTROL VAR
+ SendMessage ${CONTROL} ${LB_GETCOUNT} 0 0 ${VAR}
+!macroend
+
+
+!define NSD_LB_SelectString "!insertmacro _NSD_LB_SelectString "
+!macro _NSD_LB_SelectString CONTROL STRING
+ SendMessage ${CONTROL} ${LB_SELECTSTRING} -1 `STR:${STRING}`
+!macroend
+
+
+!define NSD_LB_GetSelection `!insertmacro __NSD_LB_GetSelection `
+!macro __NSD_LB_GetSelection CONTROL VAR
+ SendMessage ${CONTROL} ${LB_GETCURSEL} 0 0 ${VAR}
+ System::Call 'user32::SendMessage(p ${CONTROL}, i ${LB_GETTEXT}, p ${VAR}, t .s)'
+ Pop ${VAR}
+!macroend
+
+
+!define NSD_LB_GetSelectionIndex `!insertmacro __NSD_LB_GetSelectionIndex `
+!macro __NSD_LB_GetSelectionIndex CONTROL VAR
+ SendMessage ${CONTROL} ${LB_GETCURSEL} 0 0 ${VAR}
+!macroend
+
+
+!define NSD_LB_SetSelectionIndex `!insertmacro __NSD_LB_SetSelectionIndex `
+!macro __NSD_LB_SetSelectionIndex CONTROL INDEX
+ SendMessage ${CONTROL} ${LB_SETCURSEL} ${INDEX} 0
+!macroend
+
+
+!define NSD_LB_GetSelectionCount `!insertmacro __NSD_LB_GetSelectionCount `
+!macro __NSD_LB_GetSelectionCount CONTROL VAR
+ SendMessage ${CONTROL} ${LB_GETSELCOUNT} 0 0 ${VAR}
+!macroend
+
+
+!define NSD_LB_GetItemText `!insertmacro __NSD_LB_GetItemText `
+!macro __NSD_LB_GetItemText CONTROL INDEX VAR
+ System::Call 'user32::SendMessage(p${CONTROL}, i${LB_GETTEXT}, p${INDEX}, t.s)'
+ Pop ${VAR}
+!macroend
+
+
+!define NSD_LB_GetItemData `!insertmacro __NSD_LB_GetItemData `
+!macro NSD_LB_GetItemData CONTROL INDEX VAR
+SendMessage ${CONTROL} ${LB_GETITEMDATA} ${INDEX} 0 ${VAR}
+!macroend
+
+
+!define NSD_LB_SetItemData `!insertmacro __NSD_LB_SetItemData `
+!macro NSD_LB_SetItemData CONTROL INDEX DATA
+SendMessage ${CONTROL} ${LB_SETITEMDATA} ${INDEX} ${DATA}
+!macroend
+
+
+!define NSD_LB_FindStringPrefix `!insertmacro __NSD_LB_FindStringPrefix `
+!macro __NSD_LB_FindStringPrefix CONTROL STRING VAR
+ SendMessage ${CONTROL} ${LB_FINDSTRING} -1 `STR:${STRING}` ${VAR}
+!macroend
+
+
+!define NSD_LB_FindStringExact `!insertmacro __NSD_LB_FindStringExact `
+!macro __NSD_LB_FindStringExact CONTROL STRING VAR
+ SendMessage ${CONTROL} ${LB_FINDSTRINGEXACT} -1 `STR:${STRING}` ${VAR}
+!macroend
+
+
+### ProgressBar ###
+
+!define NSD_ProgressBar_SetPos `${__NSD_MkCtlCmd_WP} PBM_SETPOS 0 `
+!define NSD_ProgressBar_SetStep `${__NSD_MkCtlCmd_WP} PBM_SETSTEP 0 `
+!define NSD_ProgressBar_StepIt `${__NSD_MkCtlCmd} PBM_STEPIT 0 0 `
+!define NSD_ProgressBar_AdvanceBy `${__NSD_MkCtlCmd_WP} PBM_DELTAPOS 0 `
+!define NSD_ProgressBar_SetPackedRange `${__NSD_MkCtlCmd_LP} PBM_SETRANGE 0 ` ; LP(DWORD):MAKELONG(min,max)
+!define NSD_ProgressBar_SetRange32 `${__NSD_MkCtlCmd_WPLP} PBM_SETRANGE32 ` ; [IE3+] WP:min LP:max
+!define NSD_ProgressBar_GetPos `${__NSD_MkCtlCmd_RV} PBM_GETPOS 0 0 ` ; [IE3+]
+
+
+### Animation ###
+
+!define NSD_Anim_Close `${__NSD_MkCtlCmd} ACM_OPEN 0 0 `
+!define NSD_Anim_Play `${__NSD_MkCtlCmd} ACM_PLAY -1 0xFFFF0000 `
+!define NSD_Anim_PlayLoops `${__NSD_MkCtlCmd_WP} ACM_PLAY 0xFFFF0000 ` ; WP(UINT16):LoopCount
+!define NSD_Anim_Stop `${__NSD_MkCtlCmd} ACM_STOP 0 0 `
+!define NSD_Anim_IsPlaying `${__NSD_MkCtlCmd_RV} ACM_ISPLAYING 0 0 `
+
+!define NSD_Anim_OpenFile `!insertmacro __NSD_Anim_OpenFile `
+!macro __NSD_Anim_OpenFile CONTROL PATH
+ SendMessage ${CONTROL} ${ACM_OPEN} 0 "STR:${PATH}"
+!macroend
+
+!define NSD_Anim_OpenResource `!insertmacro __NSD_Anim_OpenResource `
+!macro __NSD_Anim_OpenResource CONTROL HINSTANCE_CC471 RESID
+ SendMessage ${CONTROL} ${ACM_OPEN} "${HINSTANCE_CC471}" "${RESID}"
+!macroend
+
+
+### TrackBar ###
+
+!define NSD_TrackBar_GetPos `${__NSD_MkCtlCmd_RV} TBM_GETPOS 0 0 `
+!define NSD_TrackBar_SetPos `${__NSD_MkCtlCmd_LP} TBM_SETPOS 1 `
+!define NSD_TrackBar_SetRangeMin `${__NSD_MkCtlCmd_LP} TBM_SETRANGEMIN 1 `
+!define NSD_TrackBar_SetRangeMax `${__NSD_MkCtlCmd_LP} TBM_SETRANGEMAX 1 `
+!define NSD_TrackBar_GetLineSize `${__NSD_MkCtlCmd_RV} TBM_GETLINESIZE 0 0 `
+!define NSD_TrackBar_SetLineSize `${__NSD_MkCtlCmd_LP} TBM_SETLINESIZE 0 `
+!define NSD_TrackBar_GetPageSize `${__NSD_MkCtlCmd_RV} TBM_GETPAGESIZE 0 0 `
+!define NSD_TrackBar_SetPageSize `${__NSD_MkCtlCmd_LP} TBM_SETPAGESIZE 0 `
+!define NSD_TrackBar_ClearTics `${__NSD_MkCtlCmd} TBM_CLEARTICS 0 0 `
+!define NSD_TrackBar_GetNumTics `${__NSD_MkCtlCmd_RV} TBM_GETNUMTICS 0 0 `
+!define NSD_TrackBar_SetTic `${__NSD_MkCtlCmd_LP} TBM_SETTIC 0 `
+!define NSD_TrackBar_SetTicFreq `${__NSD_MkCtlCmd_WP} TBM_SETTICFREQ 0 `
+!define NSD_TrackBar_GetThumbLength `${__NSD_MkCtlCmd_RV} TBM_GETTHUMBLENGTH 0 0 `
+!define NSD_TrackBar_SetBuddy `${__NSD_MkCtlCmd_WPLP} TBM_SETBUDDY ` ; WP(BOOL):Left/Right LP:HWND
+
+
+### UpDown ###
+
+!define NSD_UD_SetBuddy `${__NSD_MkCtlCmd_WP} UDM_SETBUDDY 0 `
+!define NSD_UD_GetPos `${__NSD_MkCtlCmd_RV} UDM_GETPOS 0 0 `
+!define NSD_UD_SetPos `${__NSD_MkCtlCmd_LP} UDM_SETPOS 0 `
+!define NSD_UD_GetPackedRange `${__NSD_MkCtlCmd_RV} UDM_GETRANGE 0 0 `
+!define NSD_UD_SetPackedRange `${__NSD_MkCtlCmd_LP} UDM_SETRANGE 0 ` ; LP(DWORD):MAKELONG(min,max)
+!define NSD_UD_GetPos32 `${__NSD_MkCtlCmd_RV} UDM_GETPOS32 0 0 `
+!define NSD_UD_SetPos32 `${__NSD_MkCtlCmd_LP} UDM_SETPOS32 0 `
+!define NSD_UD_SetRange32 `${__NSD_MkCtlCmd_WPLP} UDM_SETRANGE32 ` ; WP(INT32):min LP(INT32):max
+
+!define NSD_UD_GetRange32 `!insertmacro __NSD_UD_GetRange32 `
+!macro __NSD_UD_GetRange32 CONTROL OUTLO OUTHI
+ System::Call 'USER32::SendMessage(p${CONTROL},i${UDM_GETRANGE32},*i.s,*i.s)'
+ Pop ${OUTLO}
+ Pop ${OUTHI}
+!macroend
+
+!define NSD_UD_SetStaticRange `!insertmacro __NSD_UD_SetStaticRange `
+!macro __NSD_UD_SetStaticRange CONTROL MI MA
+ !define /redef /math MI ${MI} << 16
+ !define /redef /math MA ${MA} & 0xffff
+ !define /redef /math MA ${MI} | ${MA}
+ SendMessage ${CONTROL} ${UDM_SETRANGE} 0 ${MA}
+!macroend
+
+
+### HotKey ###
+
+!define NSD_HK_GetHotKey `${__NSD_MkCtlCmd_RV} HKM_GETHOTKEY 0 0 ` ; RV(WORD):MAKEWORD(VK,HOTKEYF)
+!define NSD_HK_SetHotKey `${__NSD_MkCtlCmd_WP} HKM_SETHOTKEY 0 `
+!define NSD_HK_SetRules `${__NSD_MkCtlCmd_WPLP} HKM_SETRULES `
+
+
+### IP Address ###
+
+!define NSD_IPAddress_Clear `${__NSD_MkCtlCmd} IPM_CLEARADDRESS 0 0 `
+!define NSD_IPAddress_SetPackedIPv4 `${__NSD_MkCtlCmd_LP} IPM_SETADDRESS 0 `
+!define NSD_IPAddress_IsBlank `${__NSD_MkCtlCmd_RV} IPM_ISBLANK 0 0 `
+
+!define NSD_IPAddress_GetPackedIPv4 `!insertmacro __NSD_IPAddress_GetPackedIPv4 `
+!macro __NSD_IPAddress_GetPackedIPv4 CONTROL VAR
+System::Call 'USER32::SendMessage(p${CONTROL},i${IPM_GETADDRESS},p0,*i0s)'
+Pop ${VAR}
+!macroend
+
+
+### Static ###
+
+!macro __NSD_LoadAndSetImage _LIHINSTMODE _IMGTYPE _LIHINSTSRC _LIFLAGS CONTROL IMAGE HANDLE
+ Push $0
+ Push $R0
+
+ Push "${IMAGE}" # in case ${IMAGE} is $R0
+ StrCpy $R0 ${CONTROL} # in case ${CONTROL} is $0
+
+ !if "${_LIHINSTMODE}" == "exeresource"
+ !undef _LIHINSTSRC # If (internal?) _* macro params starts using $0,
+ !define _LIHINSTSRC r0 # _LIHINSTSRC can be changed to s
+ System::Call 'kernel32::GetModuleHandle(p0)p.${_LIHINSTSRC}'
+ !endif
+
+ System::Call 'user32::LoadImage(p ${_LIHINSTSRC}, ts, i ${_IMGTYPE}, i0, i0, i${_LIFLAGS})p.r0'
+ SendMessage $R0 ${STM_SETIMAGE} ${_IMGTYPE} $0
+
+ Pop $R0
+ Exch $0
+
+ Pop ${HANDLE}
+!macroend
+
+!macro __NSD_SetIconFromExeResource CONTROL IMAGE HANDLE
+ !insertmacro __NSD_LoadAndSetImage exeresource ${IMAGE_ICON} 0 ${LR_DEFAULTSIZE} "${CONTROL}" "${IMAGE}" ${HANDLE}
+!macroend
+
+!macro __NSD_SetIconFromInstaller CONTROL HANDLE
+ !insertmacro __NSD_SetIconFromExeResource "${CONTROL}" "#103" ${HANDLE}
+!macroend
+
+!define NSD_SetImage `!insertmacro __NSD_LoadAndSetImage file ${IMAGE_BITMAP} 0 "${LR_LOADFROMFILE}" `
+!define NSD_SetBitmap `${NSD_SetImage} `
+
+!define NSD_SetIcon `!insertmacro __NSD_LoadAndSetImage file ${IMAGE_ICON} 0 "${LR_LOADFROMFILE}|${LR_DEFAULTSIZE}" `
+!define NSD_SetIconFromExeResource `!insertmacro __NSD_SetIconFromExeResource `
+!define NSD_SetIconFromInstaller `!insertmacro __NSD_SetIconFromInstaller `
+
+
+!define NSD_SetStretchedImage `!insertmacro __NSD_SetStretchedImage `
+!macro __NSD_SetStretchedImage CONTROL IMAGE HANDLE
+ Push $0
+ Push $R0
+
+ Push "${IMAGE}" # in case ${IMAGE} is $0 or $R0
+ StrCpy $R0 ${CONTROL} # in case ${CONTROL} is $0
+
+ System::Call 'user32::GetClientRect(pR0,@r0)'
+ System::Call '*$0(i,i,i.r0,i.s)'
+ Exch # swap so stack contains ImagePath and then ControlHeight
+
+ System::Call 'user32::LoadImage(p0, ts, i${IMAGE_BITMAP}, ir0, is, i${LR_LOADFROMFILE}) p.r0'
+ SendMessage $R0 ${STM_SETIMAGE} ${IMAGE_BITMAP} $0
+
+ Pop $R0
+ Exch $0
+
+ Pop ${HANDLE}
+!macroend
+
+
+!define NSD_FreeImage `!insertmacro __NSD_FreeImage `
+!define NSD_FreeBitmap `${NSD_FreeImage} `
+!macro __NSD_FreeImage IMAGE
+ ${If} ${IMAGE} P<> 0
+ System::Call gdi32::DeleteObject(ps) ${IMAGE}
+ ${EndIf}
+!macroend
+
+
+!define NSD_FreeIcon `!insertmacro __NSD_FreeIcon `
+!macro __NSD_FreeIcon IMAGE
+ System::Call user32::DestroyIcon(ps) ${IMAGE}
+!macroend
+
+
+!define NSD_ClearImage `!insertmacro __NSD_ClearImage ${IMAGE_BITMAP} `
+!define NSD_ClearBitmap `${NSD_ClearImage} `
+!define NSD_ClearIcon `!insertmacro __NSD_ClearImage ${IMAGE_ICON } `
+!macro __NSD_ClearImage _IMGTYPE CONTROL
+ SendMessage ${CONTROL} ${STM_SETIMAGE} ${_IMGTYPE} 0
+!macroend
+
+
+### INI ###
+
+!define /IfNDef NSD_Debug `System::Call kernel32::OutputDebugString(ts)`
+
+!macro __NSD_ControlCase TYPE
+ ${Case} ${TYPE}
+ ${NSD_Create${TYPE}} $R3u $R4u $R5u $R6u $R7
+ Pop $R9
+ ${Break}
+!macroend
+
+!macro __NSD_ControlCaseEx TYPE
+ ${Case} ${TYPE}
+ Call ${TYPE}
+ ${Break}
+!macroend
+
+!macro NSD_FUNCTION_INIFILE
+ !insertmacro NSD_INIFILE ""
+!macroend
+
+!macro NSD_UNFUNCTION_INIFILE
+ !insertmacro NSD_INIFILE un.
+!macroend
+
+!macro NSD_INIFILE UNINSTALLER_FUNCPREFIX
+
+ ;Functions to create dialogs based on old InstallOptions INI files
+
+ Function ${UNINSTALLER_FUNCPREFIX}CreateDialogFromINI
+
+ # $0 = ini
+
+ ReadINIStr $R0 $0 Settings RECT
+ ${If} $R0 == ""
+ StrCpy $R0 1018
+ ${EndIf}
+
+ nsDialogs::Create $R0
+ Pop $R9
+
+ ReadINIStr $R0 $0 Settings RTL
+ nsDialogs::SetRTL $R0
+
+ ReadINIStr $R0 $0 Settings NumFields
+
+ ${NSD_Debug} "NumFields = $R0"
+
+ ${For} $R1 1 $R0
+ ${NSD_Debug} "Creating field $R1"
+ ReadINIStr $R2 $0 "Field $R1" Type
+ ${NSD_Debug} " Type = $R2"
+ ReadINIStr $R3 $0 "Field $R1" Left
+ ${NSD_Debug} " Left = $R3"
+ ReadINIStr $R4 $0 "Field $R1" Top
+ ${NSD_Debug} " Top = $R4"
+ ReadINIStr $R5 $0 "Field $R1" Right
+ ${NSD_Debug} " Right = $R5"
+ ReadINIStr $R6 $0 "Field $R1" Bottom
+ ${NSD_Debug} " Bottom = $R6"
+ IntOp $R5 $R5 - $R3
+ ${NSD_Debug} " Width = $R5"
+ IntOp $R6 $R6 - $R4
+ ${NSD_Debug} " Height = $R6"
+ ReadINIStr $R7 $0 "Field $R1" Text
+ ${NSD_Debug} " Text = $R7"
+ ${Switch} $R2
+ !insertmacro __NSD_ControlCase HLine
+ !insertmacro __NSD_ControlCase VLine
+ !insertmacro __NSD_ControlCase Label
+ !insertmacro __NSD_ControlCase Icon
+ !insertmacro __NSD_ControlCase Bitmap
+ !insertmacro __NSD_ControlCaseEx Link
+ !insertmacro __NSD_ControlCase Button
+ !insertmacro __NSD_ControlCase GroupBox
+ !insertmacro __NSD_ControlCase CheckBox
+ !insertmacro __NSD_ControlCase RadioButton
+ !insertmacro __NSD_ControlCase Text
+ !insertmacro __NSD_ControlCase Password
+ !insertmacro __NSD_ControlCaseEx FileRequest
+ !insertmacro __NSD_ControlCaseEx DirRequest
+ !insertmacro __NSD_ControlCase ComboBox
+ !insertmacro __NSD_ControlCase DropList
+ !insertmacro __NSD_ControlCase ListBox
+ ${EndSwitch}
+
+ WriteINIStr $0 "Field $R1" HWND $R9
+ ${Next}
+
+ nsDialogs::Show
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}UpdateINIState
+
+ ${NSD_Debug} "Updating INI state"
+
+ ReadINIStr $R0 $0 Settings NumFields
+
+ ${NSD_Debug} "NumField = $R0"
+
+ ${For} $R1 1 $R0
+ ReadINIStr $R2 $0 "Field $R1" HWND
+ ReadINIStr $R3 $0 "Field $R1" "Type"
+ ${Switch} $R3
+ ${Case} "CheckBox"
+ ${Case} "RadioButton"
+ ${NSD_Debug} " HWND = $R2"
+ ${NSD_GetState} $R2 $R2
+ ${NSD_Debug} " Window selection = $R2"
+ ${Break}
+ ${CaseElse}
+ ${NSD_Debug} " HWND = $R2"
+ ${NSD_GetText} $R2 $R2
+ ${NSD_Debug} " Window text = $R2"
+ ${Break}
+ ${EndSwitch}
+ WriteINIStr $0 "Field $R1" STATE $R2
+ ${Next}
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}FileRequest
+
+ IntOp $R5 $R5 - 15
+ IntOp $R8 $R3 + $R5
+
+ ${NSD_CreateBrowseButton} $R8u $R4u 15u $R6u ...
+ Pop $R8
+
+ nsDialogs::SetUserData $R8 $R1 # remember field id
+
+ WriteINIStr $0 "Field $R1" HWND2 $R8
+
+ ${NSD_OnClick} $R8 ${UNINSTALLER_FUNCPREFIX}OnFileBrowseButton
+
+ ReadINIStr $R9 $0 "Field $R1" State
+
+ ${NSD_CreateFileRequest} $R3u $R4u $R5u $R6u $R9
+ Pop $R9
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}DirRequest
+
+ IntOp $R5 $R5 - 15
+ IntOp $R8 $R3 + $R5
+
+ ${NSD_CreateBrowseButton} $R8u $R4u 15u $R6u ...
+ Pop $R8
+
+ nsDialogs::SetUserData $R8 $R1 # remember field id
+
+ WriteINIStr $0 "Field $R1" HWND2 $R8
+
+ ${NSD_OnClick} $R8 ${UNINSTALLER_FUNCPREFIX}OnDirBrowseButton
+
+ ReadINIStr $R9 $0 "Field $R1" State
+
+ ${NSD_CreateFileRequest} $R3u $R4u $R5u $R6u $R9
+ Pop $R9
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}OnFileBrowseButton
+
+ Pop $R0
+
+ nsDialogs::GetUserData $R0
+ Pop $R1
+
+ ReadINIStr $R2 $0 "Field $R1" HWND
+ ReadINIStr $R4 $0 "Field $R1" Filter
+
+ ${NSD_GetText} $R2 $R3
+
+ nsDialogs::SelectFileDialog save $R3 $R4
+ Pop $R3
+
+ ${If} $R3 != ""
+ SendMessage $R2 ${WM_SETTEXT} 0 STR:$R3
+ ${EndIf}
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}OnDirBrowseButton
+
+ Pop $R0
+
+ nsDialogs::GetUserData $R0
+ Pop $R1
+
+ ReadINIStr $R2 $0 "Field $R1" HWND
+ ReadINIStr $R3 $0 "Field $R1" Text
+
+ ${NSD_GetText} $R2 $R4
+
+ nsDialogs::SelectFolderDialog $R3 $R4
+ Pop $R3
+
+ ${If} $R3 != error
+ SendMessage $R2 ${WM_SETTEXT} 0 STR:$R3
+ ${EndIf}
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}Link
+
+ ${NSD_CreateLink} $R3u $R4u $R5u $R6u $R7
+ Pop $R9
+
+ nsDialogs::SetUserData $R9 $R1 # remember field id
+
+ ${NSD_OnClick} $R9 ${UNINSTALLER_FUNCPREFIX}OnLink
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}OnLink
+
+ Pop $R0
+
+ nsDialogs::GetUserData $R0
+ Pop $R1
+
+ ReadINIStr $R1 $0 "Field $R1" STATE
+
+ ExecShell "" $R1
+
+ FunctionEnd
+
+!macroend
+
+!verbose pop
+!endif
diff --git a/KattekerCreator/nsis/Include/x64.nsh b/KattekerCreator/nsis/Include/x64.nsh
new file mode 100644
index 0000000..2b77ed5
--- /dev/null
+++ b/KattekerCreator/nsis/Include/x64.nsh
@@ -0,0 +1,111 @@
+; ---------------------
+; 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}
+;
+; 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___
diff --git a/KattekerCreator/nsis/NSIS.chm b/KattekerCreator/nsis/NSIS.chm
new file mode 100644
index 0000000..cf1717a
Binary files /dev/null and b/KattekerCreator/nsis/NSIS.chm differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/AdvSplash.dll b/KattekerCreator/nsis/Plugins/x86-ansi/AdvSplash.dll
new file mode 100644
index 0000000..3f0483f
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/AdvSplash.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/Banner.dll b/KattekerCreator/nsis/Plugins/x86-ansi/Banner.dll
new file mode 100644
index 0000000..0c43831
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/Banner.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/BgImage.dll b/KattekerCreator/nsis/Plugins/x86-ansi/BgImage.dll
new file mode 100644
index 0000000..d16f42f
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/BgImage.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/Dialer.dll b/KattekerCreator/nsis/Plugins/x86-ansi/Dialer.dll
new file mode 100644
index 0000000..d76d167
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/Dialer.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/InstallOptions.dll b/KattekerCreator/nsis/Plugins/x86-ansi/InstallOptions.dll
new file mode 100644
index 0000000..3289b0b
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/InstallOptions.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/LangDLL.dll b/KattekerCreator/nsis/Plugins/x86-ansi/LangDLL.dll
new file mode 100644
index 0000000..58bff15
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/LangDLL.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/Math.dll b/KattekerCreator/nsis/Plugins/x86-ansi/Math.dll
new file mode 100644
index 0000000..08ffdc4
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/Math.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/NSISdl.dll b/KattekerCreator/nsis/Plugins/x86-ansi/NSISdl.dll
new file mode 100644
index 0000000..4ef786f
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/NSISdl.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/Splash.dll b/KattekerCreator/nsis/Plugins/x86-ansi/Splash.dll
new file mode 100644
index 0000000..2a00e4f
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/Splash.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/StartMenu.dll b/KattekerCreator/nsis/Plugins/x86-ansi/StartMenu.dll
new file mode 100644
index 0000000..ba032c9
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/StartMenu.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/System.dll b/KattekerCreator/nsis/Plugins/x86-ansi/System.dll
new file mode 100644
index 0000000..11bb5a9
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/System.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/TypeLib.dll b/KattekerCreator/nsis/Plugins/x86-ansi/TypeLib.dll
new file mode 100644
index 0000000..9517d7f
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/TypeLib.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/UserInfo.dll b/KattekerCreator/nsis/Plugins/x86-ansi/UserInfo.dll
new file mode 100644
index 0000000..a254c43
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/UserInfo.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/VPatch.dll b/KattekerCreator/nsis/Plugins/x86-ansi/VPatch.dll
new file mode 100644
index 0000000..d32e77f
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/VPatch.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/nsDialogs.dll b/KattekerCreator/nsis/Plugins/x86-ansi/nsDialogs.dll
new file mode 100644
index 0000000..8a58b5d
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/nsDialogs.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-ansi/nsExec.dll b/KattekerCreator/nsis/Plugins/x86-ansi/nsExec.dll
new file mode 100644
index 0000000..fbc9257
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-ansi/nsExec.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/AdvSplash.dll b/KattekerCreator/nsis/Plugins/x86-unicode/AdvSplash.dll
new file mode 100644
index 0000000..44a1afc
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/AdvSplash.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/Banner.dll b/KattekerCreator/nsis/Plugins/x86-unicode/Banner.dll
new file mode 100644
index 0000000..f7ddc57
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/Banner.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/BgImage.dll b/KattekerCreator/nsis/Plugins/x86-unicode/BgImage.dll
new file mode 100644
index 0000000..bd69b9f
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/BgImage.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/Dialer.dll b/KattekerCreator/nsis/Plugins/x86-unicode/Dialer.dll
new file mode 100644
index 0000000..cb8b9c8
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/Dialer.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/InstallOptions.dll b/KattekerCreator/nsis/Plugins/x86-unicode/InstallOptions.dll
new file mode 100644
index 0000000..e7ec967
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/InstallOptions.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/LangDLL.dll b/KattekerCreator/nsis/Plugins/x86-unicode/LangDLL.dll
new file mode 100644
index 0000000..ac55eef
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/LangDLL.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/Math.dll b/KattekerCreator/nsis/Plugins/x86-unicode/Math.dll
new file mode 100644
index 0000000..7bb4b32
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/Math.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/NSISdl.dll b/KattekerCreator/nsis/Plugins/x86-unicode/NSISdl.dll
new file mode 100644
index 0000000..114cfad
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/NSISdl.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/Splash.dll b/KattekerCreator/nsis/Plugins/x86-unicode/Splash.dll
new file mode 100644
index 0000000..9770ac9
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/Splash.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/StartMenu.dll b/KattekerCreator/nsis/Plugins/x86-unicode/StartMenu.dll
new file mode 100644
index 0000000..4fa8de9
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/StartMenu.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/System.dll b/KattekerCreator/nsis/Plugins/x86-unicode/System.dll
new file mode 100644
index 0000000..dc15da4
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/System.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/TypeLib.dll b/KattekerCreator/nsis/Plugins/x86-unicode/TypeLib.dll
new file mode 100644
index 0000000..243c90e
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/TypeLib.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/UserInfo.dll b/KattekerCreator/nsis/Plugins/x86-unicode/UserInfo.dll
new file mode 100644
index 0000000..f636ecf
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/UserInfo.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/VPatch.dll b/KattekerCreator/nsis/Plugins/x86-unicode/VPatch.dll
new file mode 100644
index 0000000..8524fcd
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/VPatch.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/nsDialogs.dll b/KattekerCreator/nsis/Plugins/x86-unicode/nsDialogs.dll
new file mode 100644
index 0000000..7a9658a
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/nsDialogs.dll differ
diff --git a/KattekerCreator/nsis/Plugins/x86-unicode/nsExec.dll b/KattekerCreator/nsis/Plugins/x86-unicode/nsExec.dll
new file mode 100644
index 0000000..9ca9011
Binary files /dev/null and b/KattekerCreator/nsis/Plugins/x86-unicode/nsExec.dll differ
diff --git a/KattekerCreator/nsis/Stubs/bzip2-x86-ansi b/KattekerCreator/nsis/Stubs/bzip2-x86-ansi
new file mode 100644
index 0000000..94bf5b2
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/bzip2-x86-ansi differ
diff --git a/KattekerCreator/nsis/Stubs/bzip2-x86-unicode b/KattekerCreator/nsis/Stubs/bzip2-x86-unicode
new file mode 100644
index 0000000..840d8a7
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/bzip2-x86-unicode differ
diff --git a/KattekerCreator/nsis/Stubs/bzip2_solid-x86-ansi b/KattekerCreator/nsis/Stubs/bzip2_solid-x86-ansi
new file mode 100644
index 0000000..b3d3dbc
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/bzip2_solid-x86-ansi differ
diff --git a/KattekerCreator/nsis/Stubs/bzip2_solid-x86-unicode b/KattekerCreator/nsis/Stubs/bzip2_solid-x86-unicode
new file mode 100644
index 0000000..8c4196a
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/bzip2_solid-x86-unicode differ
diff --git a/KattekerCreator/nsis/Stubs/lzma-x86-ansi b/KattekerCreator/nsis/Stubs/lzma-x86-ansi
new file mode 100644
index 0000000..5563286
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/lzma-x86-ansi differ
diff --git a/KattekerCreator/nsis/Stubs/lzma-x86-unicode b/KattekerCreator/nsis/Stubs/lzma-x86-unicode
new file mode 100644
index 0000000..12e044c
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/lzma-x86-unicode differ
diff --git a/KattekerCreator/nsis/Stubs/lzma_solid-x86-ansi b/KattekerCreator/nsis/Stubs/lzma_solid-x86-ansi
new file mode 100644
index 0000000..090c1e1
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/lzma_solid-x86-ansi differ
diff --git a/KattekerCreator/nsis/Stubs/lzma_solid-x86-unicode b/KattekerCreator/nsis/Stubs/lzma_solid-x86-unicode
new file mode 100644
index 0000000..80791ea
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/lzma_solid-x86-unicode differ
diff --git a/KattekerCreator/nsis/Stubs/uninst b/KattekerCreator/nsis/Stubs/uninst
new file mode 100644
index 0000000..90d7d22
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/uninst differ
diff --git a/KattekerCreator/nsis/Stubs/zlib-x86-ansi b/KattekerCreator/nsis/Stubs/zlib-x86-ansi
new file mode 100644
index 0000000..9d14a63
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/zlib-x86-ansi differ
diff --git a/KattekerCreator/nsis/Stubs/zlib-x86-unicode b/KattekerCreator/nsis/Stubs/zlib-x86-unicode
new file mode 100644
index 0000000..4ca0952
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/zlib-x86-unicode differ
diff --git a/KattekerCreator/nsis/Stubs/zlib_solid-x86-ansi b/KattekerCreator/nsis/Stubs/zlib_solid-x86-ansi
new file mode 100644
index 0000000..8026c23
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/zlib_solid-x86-ansi differ
diff --git a/KattekerCreator/nsis/Stubs/zlib_solid-x86-unicode b/KattekerCreator/nsis/Stubs/zlib_solid-x86-unicode
new file mode 100644
index 0000000..10bbf22
Binary files /dev/null and b/KattekerCreator/nsis/Stubs/zlib_solid-x86-unicode differ
diff --git a/KattekerCreator/nsis/makensis.exe b/KattekerCreator/nsis/makensis.exe
new file mode 100644
index 0000000..51b65f5
Binary files /dev/null and b/KattekerCreator/nsis/makensis.exe differ
diff --git a/KattekerCreator/nsis/makensisw.exe b/KattekerCreator/nsis/makensisw.exe
new file mode 100644
index 0000000..c368fb9
Binary files /dev/null and b/KattekerCreator/nsis/makensisw.exe differ
diff --git a/KattekerCreator/nsis/nsisconf.nsh b/KattekerCreator/nsis/nsisconf.nsh
new file mode 100644
index 0000000..48a4915
--- /dev/null
+++ b/KattekerCreator/nsis/nsisconf.nsh
@@ -0,0 +1,62 @@
+;------------------------
+;DEFAULT NSIS CONFIG FILE
+;------------------------
+
+;This header file will be included when compiling any NSIS installer,
+;you can use it to add script code to every installer you compile.
+
+;This file is treated as if it is in the directory of your script.
+;When using relative paths, the files have to be in your build directory.
+
+;------------------------
+;EXAMPLES
+;------------------------
+
+;Compress installer exehead with an executable compressor (such as UPX / Petite).
+
+;Paths should be absolute to allow building from any location.
+;Note that your executable compressor should not compress the first icon.
+
+;!packhdr temp.dat '"C:\Program Files\upx\upx" -9 -q temp.dat'
+;!packhdr temp.dat '"C:\Program Files\petite\petite" -9 -b0 -r** -p0 -y temp.dat'
+
+;------------------------
+
+;Set default compressor
+
+;SetCompressor bzip2
+
+;------------------------
+
+;Change the default icons
+
+;Icon "${NSISDIR}\Contrib\Graphics\Icons\arrow-install.ico"
+;UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\arrow-uninstall.ico"
+
+;------------------------
+
+;Define symbols
+
+;!define COMPANYNAME "bla"
+
+;------------------------
+;MODERN UI
+;------------------------
+
+;The Modern UI will insert the MUI_NSISCONF macro just before processing the settings.
+;Here you can set default settings for the Modern UI.
+
+;------------------------
+
+!define MUI_INSERT_NSISCONF
+
+!macro MUI_NSISCONF
+
+ ;Example: Change the default Modern UI icons
+
+ ;!ifndef MUI_ICON & MUI_UNICON
+ ; !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\arrow-install.ico"
+ ; !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\arrow-uninstall.ico"
+ ;!endif
+
+!macroend
\ No newline at end of file